Get first and second highest values in pandas columns

To get the highest values of a column, you can use nlargest() :

df['High'].nlargest(2)

The above will give you the 2 highest values of column High.


You can also use nsmallest() to get the lowest values.

Leave a Comment