Perfect! One more thing we can do is group rows by multiple columns. Take a look:
players_by_year_country = players.groupby(['year_born', 'country'])
Instead of providing a single value inside the parentheses, we now provide a list of values. The list is surrounded by square brackets, and each value is separated by a comma. The code above will first group all tennis players by the year they were born in, and then by the country they come from.
You can use statistical functions and sorting with such groups in the same way. For instance:
players_by_year_country = players.groupby(['year_born', 'Country'])