The index property of Pandas

The index property returns the index labels of the Series/DataFrame.

Syntax a) pandas.Series.index
b) pandas.DataFrame.index

Example: We can get the index label of the Series/DataFrame.

Python

mydata=pd.read_csv("employees.csv")
mydata.index 

The output of the above code is shown below:

Pandas