This question may seem easy but I haven't seen this anywhere and since I am new to python I don't know how to approach this.
I am trying to plot a stacked bar chart from this dataframe:
A R
208 1
208 5
208 2
210 9
213 5
213 8
213 6
213 3
213 3
215 6
222 4
I tried using the following code:
df.set_index('A', inplace=True)
df['R'].plot.bar(legend=True, stacked=True)
But I want the same values on the x-axis to be stacked like this:

How would I do this?

