根据数字状态绘声绘色地合唱

2024-05-06 18:54:45 发布

您现在位置:Python中文网/ 问答频道 /正文

我想根据数据中重复的次数来构建美国地图 我试着做合唱,但我的问题是我不知道我应该用颜色写什么 这是我的密码

px.choropleth(df, 
          locations = 'state',
          color='... what should i write ....', 
         animation_frame='year',
          color_continuous_scale="Inferno",
          locationmode='USA-states',
          scope="usa",
          range_color=(0, 633),
          title='....',
          height=600
         )

这是我的部分数据 enter image description here

df.head().to_dict()

enter image description here


Tags: 数据密码df颜色地图次数whatwrite