output_notebook() 未定义 - 为什么?
output_notebook() is not defined - why?
第一次尝试散景。使用来自 http://docs.bokeh.org 的以下示例代码:
from collections import OrderedDict
from bokeh.charts import Scatter
from bokeh.sampledata.iris import flowers
output_notebook()
在iPython(Anaconda、py 3.4、Win 7)中,出现如下错误:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-2-c57c6fa8f51a> in <module>()
----> 1 output_notebook()
NameError: name 'output_notebook' is not defined
为什么?这直接来自示例。
您好像忘记导入 output_notebook
。
典型的笔记本有以下进口:
from bokeh.io import output_notebook, show
from bokeh.plotting import figure
output_notebook()
第一次尝试散景。使用来自 http://docs.bokeh.org 的以下示例代码:
from collections import OrderedDict
from bokeh.charts import Scatter
from bokeh.sampledata.iris import flowers
output_notebook()
在iPython(Anaconda、py 3.4、Win 7)中,出现如下错误:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-2-c57c6fa8f51a> in <module>()
----> 1 output_notebook()
NameError: name 'output_notebook' is not defined
为什么?这直接来自示例。
您好像忘记导入 output_notebook
。
典型的笔记本有以下进口:
from bokeh.io import output_notebook, show
from bokeh.plotting import figure
output_notebook()