Here is an example on how identify largest or smallest n rows.
Source Data : Census data for state of California.
Use Case :
Read Population data for state of California from "censusdata.ire.org".
Get 3 Counties with highest population.
Get 3 Counties with lowest population.
DataFrame.nlargest()
DataFrame.nsmallest()
Source Data : Census data for state of California.
Use Case :
Read Population data for state of California from "censusdata.ire.org".
Get 3 Counties with highest population.
Get 3 Counties with lowest population.
Syntax :
DataFrame.nsmallest()