I have a dataframe as shown below, I would like to perform a pivot so that I can plot the top 3 countries GDP per year. So I need to pivot the datadrame in such a way that it returns me the the 3 Countries with the 3 highest GDP each year
Any ideas?
Year Country GDP
01 USA 100
01 UK 80
01 Japan 50
01 China 75
02 USA 90
02 UK 65
02 Japan 70
02 China 80