I have a dataframe with indexes names of countries and columns medals. I want to get the name of the country with the most number of gold medals. I've tried this :
def answer_one():
x= df[df['Gold.2']==df['Gold.2'].max()]
return x.index
answer_one()
I want to get just the string which is the name of the country but instead I keep getting this
Index(['United States'], dtype='object')