pandas dataframe index as column code example
Example 1: pandas convert index to column
df.reset_index(inplace=True)
Example 2: define a column as index pandas
myDataFrame.set_index('column_name')
df.reset_index(inplace=True)
myDataFrame.set_index('column_name')