The Dataframe:

Image of 21 rows from the Dataframe:

![Image of 21 rows from the Dataframe](https://i.stack.imgur.com/IilRa.png)

When I group by CountryA and Country B and use max(), it looks for the max in the Year column giving me:

Code used:

```py
maxMonth = countryUnits.groupby(['CountryA','CountryB']).max()
print(maxMonth)

```

Image of 7 rows of the current output

![Image of 7 rows of the current output](https://i.stack.imgur.com/pjdLf.png)

What would I need to do to get it to look for max in the Units column, giving me this?:

Image of 7 rows of the desired output

![Image of 7 rows of the desired output](https://i.stack.imgur.com/t9TOI.png)