我已经完成了在条形图上获取值所需的所有步骤。但我在这里面临一些问题。请帮帮我。分享代码和Screeenshot。
代码:
ax = sos_df ['状态']。value_counts()。plot(kind =' bar',figsize =(10,7),color =" coral&# 34;,fontsize = 13);
我得到如下输出:
The exact values required for the bar plot I have mentioned are not getting
请告诉我一些可以帮助我在情节上获得确切值的东西。在这里分享一个参考图片。:
答案 0 :(得分:0)
ax = sos_df['Status'].value_counts().plot(kind='bar', figsize=(10,7),color="coral", fontsize=13)
for a, b in zip(range(len(set(sos_df['Status']))), list(sos_df['Status'].value_counts())):
plt.text(a, b, str(b), ha='center')
plt.show()
我想这就是你想要的......但我只能想象没有任何样本数据。