df groupby bar code example Example: bar plot group by pandas df.groupby('year').case_status.value_counts().unstack().plot.barh()