我正在制作来自kaggle的拉面评级数据集
我想看到使用scatter_geo
从plotly
开始的评论/国家数量的传播
我的代码:
country_count = df['Country'].value_counts()
import plotly.express as px
fig = px.scatter_geo(country_count, locations = country_count.index, size = country_count)
fig.show()
给我这个:
请帮忙
Tags:
由于
scatter_geo
函数的locatioinmode
参数的默认设置,完整分散不可见。当位置为国家名称时,可以将其更改为country name
。修改后的代码如下:获得的图表如下所示:
完整的文档可在此处访问:https://plotly.com/python-api-reference/generated/plotly.express.scatter_geo.html
相关问题 更多 >
编程相关推荐