I am trying to create a pie chart in plotly for showing the distribution of sales across males and females. My code is
gender_sales = df.groupby( Gender )[ gross income ].sum fig = px.pie(gender_sales, values= gross income ,names = Gender )
在执行时,我发现以下错误。
数值: 数据 框架构造者没有被适当称作!
请提供帮助。
我期待看到一张皮图。