Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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