This seems rather obvious, but I can\'t seem to figure out how to convert an index of data frame to a column?
For example:
df= gi ptt_l
A very simple way of doing this is to use reset_index() method.For a data frame df use the code below:
df.reset_index(inplace=True)
This way, the index will become a column, and by using inplace as True,this become permanent change.