我正在尝试在pycharm中使用plotly绘制熊猫数据框数据,但是它不起作用。以下是代码段。
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.
不确定这里到底出了什么问题。
有人可以帮我吗?
谢谢。