I have a two column dataframe. There are 3 different codes possible
index----| Year-----| Code-----|
0 | 2020 | a |
1 | 2020 | b |
2 | 2020 | c |
3 | 2021 | b |
4 | 2021 | b |
I want to plot a barchart so the x-axis shows the years , and above each year there should be 3 bars giving the amount of time the code occurs
CodePudding user response:
Or, with stacked=False
: