Last active
November 5, 2019 20:30
-
-
Save paulphys/65ed7e012bce25531186b4bf60fc63d0 to your computer and use it in GitHub Desktop.
removing spaces from dataframe columns
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
df.columns = df.columns.str.strip().str.lower().str.replace(' ', '_').str.replace('(', '').str.replace(')', '') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment