为什么cf.go_offline在pyCharm中不起作用

时间:2019-09-18 19:14:41

标签: python plotly offline

我正在尝试使用pycharm中的袖扣创建图。我将按照以前的帖子中的建议脱机,但是我没有任何影响,并且似乎程序正在跳过命令。

我试图降级plot,但是它不起作用,plotly(4)的更高版本与袖扣不兼容。

import cufflinks as cf
import pandas as pd
import numpy as np
from plotly import __version__
from plotly.offline import *
from matplotlib import pyplot as plt
init_notebook_mode(connected=True)
cf.go_offline()


df=pd.DataFrame(np.random.rand(100,4),columns='A B C D'.split())
df.iplot()
plt.show()

# The error I am getting is:

Aw, snap! We didn't get a username with your request.
Traceback (most recent call last):

  File "C:/Users/Maciek_pc/Documents/studies/programming/ML/cufflinks/cufflinks1.py", line 21, in <module>
Don't have an account? https://plot.ly/api_signup
    df.iplot()

Questions? accounts@plot.ly
  File "C:\Users\Maciek_pc\AppData\Local\Programs\Python\Python36\lib\site-packages\cufflinks\plotlytools.py", line 1216, in _iplot
    dimensions=dimensions,display_image=kwargs.get('display_image',True))
  File "C:\Users\Maciek_pc\AppData\Local\Programs\Python\Python36\lib\site-packages\cufflinks\plotlytools.py", line 1462, in iplot
    filename=filename)

0 个答案:

没有答案