ImportError:Plotly Express 需要安装 pandas

Pze*_*zet 10 python pandas plotly plotly-python

当我尝试导入plotly.express时出现错误:

ImportError: Plotly express requires pandas to be installed.
Run Code Online (Sandbox Code Playgroud)

安装说明没有提到必须安装任何额外的东西。我可以单独导入plotly,只有在导入plotly.express时才会出现错误。有想法该怎么解决这个吗?

ash*_*l16 4

Pandas 是一个依赖项,仅在plotly.express 中使用,而不在plotly 中使用。有关更多信息,您可以访问此问题。因此您需要使用pip install pandas或安装 pandasconda install -c anaconda pandas