dataframe groupby barplot code example
Example 1: bar plot group by pandas
df.groupby('year').case_status.value_counts().unstack().plot.barh()
Example 2: pandas groupby
data.groupby('month', as_index=False).agg({"duration": "sum"})
df.groupby('year').case_status.value_counts().unstack().plot.barh()
data.groupby('month', as_index=False).agg({"duration": "sum"})