VOOZH about

URL: https://www.geeksforgeeks.org/python/get-the-index-of-minimum-value-in-dataframe-column/

⇱ Get the index of minimum value in DataFrame column - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Get the index of minimum value in DataFrame column

Last Updated : 30 Oct, 2025

In this article, we will learn how to get the index of the minimum value from a specific column in a Pandas DataFrame using .idxmin().

To download the dataset used in this article, click here.

Dataset Preview

Output

👁 Screenshot-2025-09-30-102413

Code 1: Find Index of Minimum Weight

To find the row with the smallest weight, use idxmin(). It gives the index of that row.

Output

👁 Screenshot-2025-09-30-102740

We can verify whether the minimum value is present in index or not.

Output

👁 Image

Explanation: df.iloc[140:155]: returns rows from position 140 to 154 of the DataFrame.

Code 2: Insert a Row and Find Minimum Salary

Insert a custom row at index 0 with the minimum salary, and check if .idxmin() correctly identifies it.

Output

👁 Image

Explanation:

  • pd.concat([new_row, df]): Combines new_row with df, adding the new row at the top.
  • .reset_index(drop=True): Resets the row numbers so they start from 0 and removes the old index.

Now check the minimum salary index:

Comment