Skip to content

Instantly share code, notes, and snippets.

@rajeshmr
Created December 7, 2017 10:25
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 rajeshmr/ee4869c7a2a3fc800bc4942f5620f645 to your computer and use it in GitHub Desktop.
Save rajeshmr/ee4869c7a2a3fc800bc4942f5620f645 to your computer and use it in GitHub Desktop.
def preprocess(text):
text= text.strip().lower().split()
text = filter(lambda word: word not in STOPWORDS, text)
return " ".join(text)
for dataset in datasets:
dataset['title'] = dataset['title'].apply(preprocess)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment