VOOZH about

URL: https://www.geeksforgeeks.org/python/select-row-with-maximum-and-minimum-value-in-pandas-dataframe/

⇱ Select row with maximum and minimum value in Pandas dataframe - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Select row with maximum and minimum value in Pandas dataframe

Last Updated : 11 Jul, 2025

Let's see how can we select rows with maximum and minimum values in Pandas Dataframe with help of different examples using Python.

Creating a Dataframe to select rows with max and min values in Dataframe

Output:

👁 Image
 

Select row with maximum value in Pandas Dataframe

Example 1: Shows max on Driver, Points, and Age columns. 

Output:

👁 Image
 

Example 2: Who scored max points 

Output: 

👁 Image
 

Example 3: What is the maximum age 

Output:

39

Example 4: Which row has maximum age in the Dataframe | who is the oldest driver? 

Output: 

👁 Image
 

Select row with maximum value in Pandas Dataframe

Example 1: Shows min on Driver, Points, Age columns. 

Output:

👁 Image
 

Example 2: Who scored fewer points 

Output:

👁 Image
 

Example 3: Which row has minimum age in the Dataframe who is the youngest driver 

Output:

👁 Image
 
Comment