美文网首页
NameError: name 'go' is not defi

NameError: name 'go' is not defi

作者: 数据志 | 来源:发表于2020-03-02 23:13 被阅读0次

最近在学习fbprophet时,按照安装步骤,搭建好环境之后,使用官方教程进行学习。在执行到下面这句时报错

fig = plot_plotly(m, forecast) # This returns a plotly Figure

具体报错为:

NameError Traceback (most recent call last)
<ipython-input-20-42c219cbc949> in <module>
----> 1 fig = plot_plotly(m, forecast) # This returns a plotly Figure

~/anaconda3/lib/python3.7/site-packages/fbprophet/plot.py in plot_plotly(m, fcst, uncertainty, plot_cap, trend, changepoints, changepoints_threshold, xlabel, ylabel, figsize)
566 data = []
567 # Add actual
--> 568 data.append(go.Scatter(
569 name='Actual',
570 x=m.history['ds'],

NameError: name 'go' is not defined

解决方法:

如果已经安装plotly,这里就不需要安装了。

pip install plotly
pip install ipywidgets

转载请注明:

微信公众号:数据志

简书:数据志

博客园:https://www.cnblogs.com/wheng/

CSDN:https://blog.csdn.net/wzgl__wh

相关文章

网友评论

      本文标题:NameError: name 'go' is not defi

      本文链接:https://www.haomeiwen.com/subject/tisgkhtx.html