Last active
November 9, 2017 05:13
-
-
Save reservoirinvest/7db87eab91c9148e646112b46144f7b2 to your computer and use it in GitHub Desktop.
Rename column names #pandas
This file contains hidden or 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
df = df.rename(columns={'oldName1': 'newName1', 'oldName2': 'newName2'}) | |
# OR | |
df.rename(columns={'oldName1': 'newName1', 'oldName2': 'newName2'}, inplace=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment