Skip to content

Instantly share code, notes, and snippets.

@hamletbatista
Created February 27, 2019 22:03
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 hamletbatista/1ba2743340c7c1c3d75fac1f333e3514 to your computer and use it in GitHub Desktop.
Save hamletbatista/1ba2743340c7c1c3d75fac1f333e3514 to your computer and use it in GitHub Desktop.
from collections import Counter
import re
import nltk
from nltk.corpus import stopwords
nltk.download('stopwords')
from urllib.parse import urlparse
df["path"]=df.index.map(lambda x: urlparse(x).path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment