Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

reorder columns pandas

cols = df.columns.tolist()
# Rearrange the list any way you want
cols = cols[-1:] + cols[:-1]
df = df[cols]
Source by www.statology.org #
 
PREVIOUS NEXT
Tagged: #reorder #columns #pandas
ADD COMMENT
Topic
Name
9+2 =