阴谋不显示Intellij

问题描述 投票:0回答:2

我开始学习plotly,但我有一个问题。我正在使用Intellij Idea Ultimate

1.为什么plotly不能在python控制台上工作?当使用科学模式时,我们需要使用python控制台调试器来查看我们的数据,但是当使用此调试模式时,plotly不工作,它只执行数据。但plotly在运行文件中工作

2.即使使用 python 控制台调试器,绘图也没有显示在我的 Intellij Plot Sciview 中

这是我的错误还是错误?谢谢

这是我的代码

import pandas as pd
import plotly.express as px


df = pd.read_csv('netflix_titles.csv')
df_clean = pd.read_csv('netflix_titles.csv')
df['date_added'] = pd.to_datetime(df['date_added'], infer_datetime_format=True)
example = 'September 9, 2019'
pd.to_datetime(example, infer_datetime_format=True)
df = df.dropna(axis=0, how='any')
df = df[['release_year', 'title', 'director', 'country', 'date_added', 
           'duration']].sort_values('release_year',ascending=True)
figf = px.pie(df, values='release_year', names='country')
figf.show()

Plot not showing plotly

python intellij-idea plotly
2个回答
2
投票

PyCharm 和 IntelliJ 尚不支持plotly。

其问题跟踪器中有一个功能请求https://youtrack.jetbrains.com/issue/PY-43407,请随意投票和评论。


0
投票

如果您不介意在浏览器中显示您的图形,请尝试Figf.show(renderer='browser') - 这是我使用的解决方案,当我的图甚至没有显示在带有TF的conda env的PyCharm中时2.10

© www.soinside.com 2019 - 2024. All rights reserved.