Skip to content

Instantly share code, notes, and snippets.

@tommyhuang1
Created February 12, 2017 18:34
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 tommyhuang1/53eeb3e87f5532631a9d1131fc975ac9 to your computer and use it in GitHub Desktop.
Save tommyhuang1/53eeb3e87f5532631a9d1131fc975ac9 to your computer and use it in GitHub Desktop.
Data Cleaning
Data = appended_data
Data['Condition'] = map(lambda x: x.replace('for ',''),Data['Condition'])
Data['Condition'] = map(lambda x: x.replace('Neurontin (gabapentin) for ',''),Data['Condition'])
#save the data into CSV
Data.to_csv('gabapentinData.csv', index=False,encoding="utf-8")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment