I have the dataset in the below format
Im trying to generate a histogram for the below question
Generate a histogram for the Age feature of all medal winners in the top five sports in 2016
Below is my code for the same
df4= df
df4= df4.loc[df['Year'] == 2016]
filter_Age= df4.groupby(['Age','Sport'])['Medal'].count().sort_values(ascending= True)
filter_Age.hist()
but the expected output is this:
I dont know where im going wrong! Any help is appreciated