I have some data frame:
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
This is my code:
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')
I would like put horizontal line on my plot which looks like a below:
I would like put horizontal average line on my plot which might be looks like:
I dont have any error and dont have any line i dont know why. Could you advise ?
question from:
https://stackoverflow.com/questions/65640677/average-line-on-plot 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…