问题描述
我有一些数据框:
Country Product_Category count
1 Australia Bikes 7064
5 Canada Bikes 1548
7 France Bikes 2770
10 Germany Bikes 3048
13 United Kingdom Bikes 3524
16 United States Bikes 8028
这是我的代码:
plot1 = df.groupby('Country')['Product_Category'].value_counts().rename('count').reset_index()
plot1 = plot1[plot1['Product_Category'] =='Bikes']
# plot
ax1 = sn.barplot(x="Country",y="count",data=plot1)
mean = plot1['count'].mean()
ax.axhline(mean,color='r')
plt.title('Sprzedaż rowerów w wybranych Państwach')
我想在我的情节上放置水平线,如下所示:
我想在我的绘图上放置水平平均线,它可能如下所示:
我没有任何错误,也没有任何线路,我不知道为什么。你能给建议吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)