I have a video game dataset that I downloaded from data.world.The dataset includes columns with the names of the video games, the years & sales in multiple regions. I want to find the top sold game every year. I used the following code
group=vidgame_3.groupby(["Year"])["Global_Sales"].max()
This code returned the year & the max sale but it omitted the name column which I want to include as well. How do I include another column.
The dataset has 3 columns(Name,Year,Global Sales) that I am concerned with. I want to calcuate a tabel where I get the highest sold game by year & the name as well, When I use the group function by year, I get the year and the amount but not the name of the game.