-
-
Save carlcrott/6bcaa8c656924432c603 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 sanitise_single_string(unclean): | |
if unclean and bool( re.match(r'^[\w-]+$', unclean) ): | |
# do splice | |
raw_load_data = splice_db_into_dataframe(raw_load_data, unclean) | |
elif unclean: | |
# logging malformed metername | |
logging.warning('Error parsing meter name: ' + unclean + ' ... must match regex: ^[\w-]+$') | |
clean = unclean | |
del( unclean ) | |
return clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment