df.reset_index(inplace=True)
# method A
df = df.set_index('col')
# method B
df['col'] = df.index
df['index'] = df.index
How to convert index of a pandas dataframe into a column
df = df.reset_index(level=0)
df['index1'] = df.index
df.set_index('Number')