Created
December 2, 2014 00:44
-
-
Save szeitlin/c04a3560627ba540f0a2 to your computer and use it in GitHub Desktop.
remove spaces from strings (helper function for data cleaning)
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
| def remove_spaces(name): | |
| '''Helper function removes spaces from string and returns it as a single word. | |
| (str) -> (str) | |
| >>> remove_spaces('Poly CO2') | |
| PolyCO2 | |
| ''' | |
| nname = name.replace(" ", "") | |
| return nname | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment