cnt=Counter() english_stopwords = set(stopwords.words('english')) for path in df.path: words = re.split("[-/]", path) for word in words: if len(word) > 0 and word not in english_stopwords and not word.isdigit(): cnt[word] += 1 cnt.most_common(25)