Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python pandas shift last column to first place

cols = list(df.columns)
cols = [cols[-1]] + cols[:-1]
df = df[cols]
Source by datascience.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #python #pandas #shift #column #place
ADD COMMENT
Topic
Name
8+2 =