[英]Python Plot Bar Chart Summing a Column, Grouped by Two Different Columns
I have a data set: 我有一个数据集:
Year Month Category Count Line
2019 1 a 2 5
2019 2 b 5 7
2018 1 a 7 12
I want to plot a bar chart in chronological order where the y axis is a sum of the Count field and there is a separate secondary axis for the Line column (no sum). 我想按时间顺序绘制条形图,其中y轴是Count字段的总和,并且Line列有一个单独的辅助轴(无和)。
I am having trouble creating that group and sum. 我无法创建该组并总结。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.