Pandas read CSV set index column



examples/pandas/read_csv_set_index.py
import pandas as pd

df = pd.read_csv('planets.csv', index_col='Planet name')
print(df.head(2))

             Distance (AU)   Mass
Planet name                      
Mercury                0.4  0.055
Venus                  0.7  0.815