【发布时间】:2017-06-18 07:50:05
【问题描述】:
CH Gayle 17
YK Pathan 16
AB de Villiers 15
DA Warner 14
SK Raina 13
RG Sharma 13
MEK Hussey 12
AM Rahane 12
MS Dhoni 12
G Gambhir 12
我有一个这样的系列。我想在 x 轴上绘制玩家,在 y 轴上绘制它们各自的值。我试过这段代码:
man_of_match=(matches['player_of_match'].value_counts())
sns.countplot(x=(man_of_match),data=matches,color='B')
sns.plt.show()
但使用此代码,它会绘制数值的频率,即在 x 轴上绘制 12,y 轴上的计数变为 4。同样,对于 x 轴上的 13,它在 y 轴上显示 2。
如何让x轴显示玩家的名字,y轴显示玩家的对应值?
【问题讨论】:
标签: python pandas matplotlib seaborn data-analysis