Created
January 7, 2022 21:17
-
-
Save KevinGutowski/e8a3059a30cfc38dbc7b959d5bdbdc09 to your computer and use it in GitHub Desktop.
Reorder pandas column using indexes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
columns = list(df.columns) | |
df = df[[columns[i] for i in [3,2,1,4,6,4,8]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment