DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
5+6 =
Submit