Issue
I am trying to do two bar plot (Descending order) in python with following criteria,
1- observations by month with total count.
2- observations by month with value A > 0.
I am struggling to create this in python.
Solution
IIUC, you a can try this:
df.groupby('month', sort=False)['value A'].agg(['sum', 'count']).plot.bar()
Output:
Answered By - Scott Boston
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.