Skip to content

Instantly share code, notes, and snippets.

@abhishek-shrm
Created August 4, 2020 03:06
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 abhishek-shrm/502be4077635a8c6269057f5465f28a4 to your computer and use it in GitHub Desktop.
Save abhishek-shrm/502be4077635a8c6269057f5465f28a4 to your computer and use it in GitHub Desktop.
# Removing extra spaces
training_corpus['cleaned']=training_corpus['cleaned'].apply(lambda x: re.sub(' +',' ',x))
testing_corpus['cleaned']=testing_corpus['cleaned'].apply(lambda x: re.sub(' +',' ',x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment