I have an IPL Data Set called matches.csv which I am fetching from Kaggle, from where I am trying to find out the place where the maximum number of matches were played.
The below code is giving me the correct value for the number of matches played, but I would like to check the Name of the Stadium where the maximum number of matches were played.
matches['venue'].value_counts().max()
This gives me 66
Expected Output is to be like:
M Chinnaswamy Stadium 66
Also if it is possible I would like to get all the details of the last match that was played in that Stadium.
Below is the head of the dataframe:
id season city date team1 team2 toss_winner toss_decision result dl_applied winner win_by_runs win_by_wickets player_of_match venue umpire1 umpire2 umpire3
0 1 2017 Hyderabad 2017-04-05 Sunrisers Hyderabad Royal Challengers Bangalore Royal Challengers Bangalore field normal 0 Sunrisers Hyderabad 35 0 Yuvraj Singh Rajiv Gandhi International Stadium, Uppal AY Dandekar NJ Llong NaN
1 2 2017 Pune 2017-04-06 Mumbai Indians Rising Pune Supergiant Rising Pune Supergiant field normal 0 Rising Pune Supergiant 0 7 SPD Smith Maharashtra Cricket Association Stadium A Nand Kishore S Ravi NaN
2 3 2017 Rajkot 2017-04-07 Gujarat Lions Kolkata Knight Riders Kolkata Knight Riders field normal 0 Kolkata Knight Riders 0 10 CA Lynn Saurashtra Cricket Association Stadium Nitin Menon CK Nandan NaN
value_counts(). Do you agree?value_countsresult is still a dataframe. Although I did just notice the last bit where OP asks for information from the last match, which would require a bit more information as you pointed out.