Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas form multiindex to column

df = df.reset_index()  

'''
The reset_index() is a pandas DataFrame method that 
will transfer index values into the DataFrame as columns. 
The default setting for the parameter is drop=False (which 
will keep the index values as columns).
'''
 
PREVIOUS NEXT
Tagged: #pandas #form #multiindex #column
ADD COMMENT
Topic
Name
7+5 =