python dataframe get index column code example
Example 1: pandas print index
# Import pandas package
import pandas as pd
# making data frame
data = pd.read_csv("data.csv")
print(data.index)
Example 2: get index number pandas dataframe
df.index[df['BoolCol'] == True].tolist()