◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
python如何在dataframe中使用iplot?
如图所示,出现了问题:
typeerror: 'dataframe' object has no attribute 'iplot'
这个问题的根源在于pandas的dataframe对象没有内置的iplot方法。要使用iplot方法,需要利用第三方库cufflinks将plotly的iplot方法导入到dataframe中。
具体步骤如下:
立即学习“Python免费学习笔记(深入)”;
安装cufflinks库:
pip install cufflinks
导入cufflinks库:
import cufflinks as cf
设置脱机模式:
cf.go_offline()
设置配置文件:
cf.set_config_file(offline=False, world_readable=True)
完成以上步骤后,就可以在dataframe对象上调用iplot方法了。
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。