Skip to content

Instantly share code, notes, and snippets.

@arunm8489
Created July 31, 2020 13:23
Show Gist options
  • Save arunm8489/904b8d81ba46b62954125bf7787372d5 to your computer and use it in GitHub Desktop.
Save arunm8489/904b8d81ba46b62954125bf7787372d5 to your computer and use it in GitHub Desktop.
def clean_pro(col):
col = col.str.replace('The', '')
col = col.str.replace(' ','')
col = col.str.replace('&','_')
col = col.str.replace(',','_')
col = col.str.lower()
return col
data['project_subject_subcategories'] = clean_pro(data['project_subject_subcategories'])
data['project_subject_categories'] = clean_pro(data['project_subject_categories'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment