Created
May 2, 2019 01:29
-
-
Save bdkech/679a9cacc60bdd17e5f38f71bc7bcb96 to your computer and use it in GitHub Desktop.
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
def standardize(s): | |
import re | |
try: | |
standard_s = re.sub('[^0-9a-zA-Z]+', '_', str(s)).lower() | |
return standard_s | |
except Exception as e: | |
print("ERROR exception caught: " + str(e)) | |
return False | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment