Issue
I am using a dataframe that has the 1st, 2nd, and 3rd place scores as the rows and the years of those scores by column. I am trying to create a stacked bar chart in order to show the scores by year stacked by 1st, 2nd, and 3rd place. I don't know how to get it to stack properly without row names?
Solution
Try:
>>> df.rename(index={0: "first", 1: "second", 2: "third"}).T.plot.bar(stacked=True)
Output:
Answered By - not_speshal
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.