'How to create a bar chart based on the presented data frame?
I am trying to produce a bar chart for the data frame above and I am having issues doing so. My code for this data frame is:
high_pay[['Sport', 'Name', 'Year', 'earnings ($ million)']] \
.sort_values('earnings ($ million)', ascending=False) \
.drop_duplicates('Sport', keep='first')
What would be the appropriate way to put this information in a bar chart where Sport
is on the x axis and earnings ($ million)
is on the y axis?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|