Animal classification with python

Question

Given the following dataframe, write code to list the size of the each animal with the highest weight.

adult animal size weight
0 False cat M 8
1 True dog M 10
2 False cat M 11
3 False fish S 1
4 True dog L 20
5 True cat M 12
6 True cat M 12

Format of output should be:

Animal | Size
____________
Cat | ?
Dog | ?
Fish | ?

Solution

Access restricted

Subscribe to premium account to see the solution.

Get premium now