Created
January 27, 2015 18:20
-
-
Save kburnham/f43481b1f45a7a6ddf89 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
#clean the religion and denomination names | |
def clean_religion(entry): | |
new_entry = entry.lower() | |
if new_entry == "latter_day_saints": | |
return "Mormon" | |
if new_entry == "roman_catholic": | |
return "Catholic" | |
if 'jehovahs' in new_entry: | |
return "Jehovah's Witness" | |
return entry.replace('_',' ').title() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment