[英]stacked bar graph from groupby and count
I have a data frame like this after a groupby
and count
operation:在groupby
和count
操作之后,我有一个这样的数据框:
timestamp status 2018-08-27 0 15 1 5 2 28 2018-08-28 0 20 1 10 2 58 ...
When I try and plot it using df.plot.bar(stacked=True)
I get the following graph which is not correct.当我尝试使用df.plot.bar(stacked=True)
绘制它时,我得到以下不正确的图表。 How can I actually plot my calculation as a stacked bar graph?我如何将我的计算实际绘制为堆叠条形图?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.