logo
Loading...

px的細項 px.data.tips()是指? - Cupoy

values=Data_US_total.loc[0,["Active_case&quot...

px的細項 px.data.tips()是指?

2021/04/04 下午 08:22
Yun
觀看數:13
回答數:1
收藏數:0

```python values=Data_US_total.loc[0,["Active_case","Recovered","Deaths"]] labels = ["Active cases","Recovered","Deaths"] **df = px.data.tips() ** fig = px.pie( df,values=values, names=labels, title='Confirmed cases in US: '+str(Data_US_total["Confirmed"][0]), color_discrete_sequence=['red','green','darkblue'], hole=.5) fig.update_traces(textposition='inside', textinfo='percent+label') fig.show() ``` df = px.data.tips() fig = px.pie( df, ......) 裡面有df跟沒df跑出來結果一樣 想知道差別是什麼