Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert index of a pandas dataframe into a column

How to convert index of a pandas dataframe into a column
df = df.reset_index(level=0)
df['index1'] = df.index
Source by # #
 
PREVIOUS NEXT
Tagged: #convert #index #pandas #dataframe #column
ADD COMMENT
Topic
Name
2+4 =