我试图在pycharm中使用plotly绘制一个pandas数据帧数据,但它无法正常工作。以下是代码段。
import plotly.plotly as py
import pandas as pd
import numpy as np
import cufflinks as cf
cf.go_offline()
df = pd.DataFrame(np.random.randn(100,4),columns='A B C D'.split())
print(df.head())
df.iplot()
当我在pycharm中运行上面的代码时,它会抛出错误
plotly.exceptions.PlotlyError: Because you didn't supply a 'file_id' in the call, we're assuming you're trying to snag a figure from a url. You supplied the url, '', we expected it to start with 'https://plot.ly'.
Run help on this function for more information.
不确定这里究竟出了什么问题。
谁能帮我这个?
谢谢。