Définir l'index sur la colonne Pandas
# method A
df = df.set_index('col')
# method B
df['col'] = df.index
JJSSEECC
# method A
df = df.set_index('col')
# method B
df['col'] = df.index
df.reset_index(inplace=True)
df = df.rename(columns = {'index':'new column name'})
df = df.set_index('col')
>>> college_idx = college.set_index('instnm')>>> sats = college_idx[['satmtmid', 'satvrmid']].dropna()>>> sats.head()
Pandas dataframe set-index