首页 > 解决方案 > iplot 是否适用于带有 cufflinks 包的 python 版本 >2.7?

问题描述

我在 jupyter notebook 中有这段代码

   df = cars[['cyl', 'wt', 'mpg']]

   layout = dict(
               title = 'Chart from Pandas DataFrame',
               xaxis = dict(title = 'x-axis'),
               yaxis = dict(title = 'y-axis')
   )

   df.iplot(filename = 'cf-simple-line-chart', layout = layout)`

汽车数据集可以在https://github.com/syedRumman/Python-and-Data-Science.git找到

我正在使用 python 3.7 版本。当我尝试使用 df.iplot() 时,出现此错误

#The data property of a figure may only be assigned a list or tuple that contains a permutation of a subset of itself
Invalid trace(s) with uid(s): {None} 

当我打电话

df.iplot(filename = 'cf-simple-line-chart', layout = layout)

错误

iplot() 是否与版本 > 2.7 中的 pandas 数据框库不兼容?

标签: pythonpandasplotly

解决方案


推荐阅读