Setzen Sie den Index auf Spalte 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
import pandas as pd
# Set column as index
df = df.set_index("column")
# Display DataFrame
print(df)