Let`s see how we can get the index of the minimum value in a DataFrame column.
Observe this dataset first. We will use the Weight and Salary columns of this data to get the index of the minimum values from a specific column in the Pandas DataFrame.
# import pandas module
pandas as pd
# create data frame
" https://media.python.engineering/wp-content/uploads/nba.csv "
df. head (
Code # 1: Check the index for the minimum weight.
We can check if the minimum value is present in the index or not.
Code # 2: Let`s insert a new line with index 0 that has the minimum wage and then print the minimum wage.
Now Let`s check if the minimum wage is in the index 0 or not.