df print row by index code example
Example 1: dataframe get row by name
row_data = df.loc[ 'a' , : ]
Example 2: pandas print index
# Import pandas package
import pandas as pd
# making data frame
data = pd.read_csv("data.csv")
print(data.index)