python dataframe print index code example
Example 1: how to print dataframe in python without index
import pandas
d = ['a','b','c','d','e']
df = pandas.DataFrame(data=d)
print (df.to_string(index = False))
Example 2: pandas print index
# Import pandas package
import pandas as pd
# making data frame
data = pd.read_csv("data.csv")
print(data.index)