import plotly
plotly.offline.init_notebook_mode() # run at the start of every notebook plotly.offline.iplot({ "data": [{ "x": [1, 2, 3], "y": [4, 2, 5] }], "layout": { "title": "hello world" } })