I'm learning Pandas
and stumble around finding the entire row of Data frame
having maximum of one column
A B
0 Fruits 122
1 Veggies 23
2 Eggs 223
How to get the entire row where B is maximum
This is what I tried:
df['B'].max()
, however this just gives me the index i.e. 2
. How to get the entire row such as
Eggs 223
.
Can someone suggest one liner pls