Skip to content

Instantly share code, notes, and snippets.

@kburnham
Created January 27, 2015 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kburnham/f43481b1f45a7a6ddf89 to your computer and use it in GitHub Desktop.
Save kburnham/f43481b1f45a7a6ddf89 to your computer and use it in GitHub Desktop.
#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