[英]Missing Data Plotly Express px.data
在此處的示例中
https://plotly.com/python/px-arguments/#plotly-express-works-with--long-wide-and-mixedform-data
數據導入只有一行: wide_df = px.data.medals_wide()
我通過 Anaconda 嘗試了我的 Python 並得到了這個Traceback: AttributeError: module 'plotly.express.data' has no attribute 'medals_wide'
我剛試過這段代碼:
for name in dir(px.data):
if '__' not in name:
print(name)
並得到
absolute_import
carshare
election
election_geojson
gapminder
iris
tips
wind
根據結果,我錯過了包括獎牌在內的一些數據,然后我嘗試在 Anaconda 提示下重新安裝 Plotly 和 Plotly Express,但問題仍然存在
Successfully installed plotly-express-0.4.1
當我嘗試pip install plotly
以防萬一我得到更新
Requirement already satisfied: plotly in c:\users\ appdata\roaming\python\python37\site-packages (4.7.1)
Requirement already satisfied: retrying>=1.3.3 in c:\users\ appdata\roaming\python\python37\site-packages (from plotly) (1.3.3)
Requirement already satisfied: six in c:\users\\anaconda3\lib\site-packages (from plotly) (1.14.0)
謝謝
如果您更新到 Plotly 版本4.14
,它將可用。
檢查您當前的版本:
import plotly
plotly.__version__
如有必要,請運行:
pip install plotly==4.14.3
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.