【发布时间】:2020-02-16 17:53:16
【问题描述】:
Seaborn 条形图中的 y 值与我的数据显示的不同。
我的数据显示:
yearmonth
2018-10 763308.0
2018-11 708366.0
2018-12 703952.0
2019-01 844039.0
2019-02 749583.0
2019-03 826114.0
2019-04 951304.0
2019-05 1042708.0
2019-06 1043556.0
2019-07 1201030.0
2019-08 1065393.0
2019-09 881391.0
Freq: M, Name: csp_workload, dtype: float64
剧情代码为:
plt.figure(figsize=(15,5))
sns.barplot(x="yearmonth", y="workload", data = df_all, ci=0)
plt.tight_layout()
输出显示的值小于数据。例如,2018-10 的值在条形图中显示约为 1,800,但应该在 763308 左右。我可以做些什么来纠正这个问题?
【问题讨论】:
标签: python pandas matplotlib seaborn