python - 无法在pycharm中使用plotly绘制熊猫数据框数据
问题描述
我正在尝试在 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.
不确定这里到底出了什么问题。
谁能帮我这个?
谢谢。
解决方案
推荐阅读
- php - 使用 nginix 未在 docker 中加载 css
- apache-spark - 任务不可序列化异常使用火花 KeyValueGroupedDataset 并且每个组在窗口中聚合时
- jenkins - 如何在 Windows 中使用 jenkinsfile 进行 Nant 构建以进行管道作业?
- maven - 连接超时:在 Maven 中从 Nexus 下载时连接错误
- python - WebDriverException:消息:TypeError:无法访问死对象
- mysql - 返回表MYSQL的过程或函数
- html - CSS - 优化同一项目的恒定屏幕尺寸变化以提高性能
- linux - 每日 grep 和输出状态
- php - 从数据库中选择带有信息的选项
- asp.net - 使用 Azure 上的现有数据库部署 ASP MVC 应用程序