・たった1行で動くグラフを作成
・plotly、plotly_expressのインストール方法
・plotly_expressのインポート方法
・help機能の使い方(★必須ツール★)
・データの用意(事前の準備不要)
・動く円グラフ作成
pip install plotly
Requirement already satisfied: plotly in /opt/anaconda3/lib/python3.7/site-packages (4.8.2) Requirement already satisfied: six in /opt/anaconda3/lib/python3.7/site-packages (from plotly) (1.14.0) Requirement already satisfied: retrying>=1.3.3 in /opt/anaconda3/lib/python3.7/site-packages (from plotly) (1.3.3) Note: you may need to restart the kernel to use updated packages.
pip install plotly_express
Requirement already satisfied: plotly_express in /opt/anaconda3/lib/python3.7/site-packages (0.4.1) Requirement already satisfied: plotly>=4.1.0 in /opt/anaconda3/lib/python3.7/site-packages (from plotly_express) (4.8.2) Requirement already satisfied: scipy>=0.18 in /opt/anaconda3/lib/python3.7/site-packages (from plotly_express) (1.4.1) Requirement already satisfied: statsmodels>=0.9.0 in /opt/anaconda3/lib/python3.7/site-packages (from plotly_express) (0.11.0) Requirement already satisfied: patsy>=0.5 in /opt/anaconda3/lib/python3.7/site-packages (from plotly_express) (0.5.1) Requirement already satisfied: pandas>=0.20.0 in /opt/anaconda3/lib/python3.7/site-packages (from plotly_express) (1.0.5) Requirement already satisfied: numpy>=1.11 in /opt/anaconda3/lib/python3.7/site-packages (from plotly_express) (1.18.5) Requirement already satisfied: retrying>=1.3.3 in /opt/anaconda3/lib/python3.7/site-packages (from plotly>=4.1.0->plotly_express) (1.3.3) Requirement already satisfied: six in /opt/anaconda3/lib/python3.7/site-packages (from plotly>=4.1.0->plotly_express) (1.14.0) Requirement already satisfied: python-dateutil>=2.6.1 in /opt/anaconda3/lib/python3.7/site-packages (from pandas>=0.20.0->plotly_express) (2.8.1) Requirement already satisfied: pytz>=2017.2 in /opt/anaconda3/lib/python3.7/site-packages (from pandas>=0.20.0->plotly_express) (2019.3) Note: you may need to restart the kernel to use updated packages.
import plotly.express as px
help(px)
df=px.data.tips()
fig=px.sunburst(df,path = ['smoker','day','time','sex'],values='total_bill')
fig.show()