I have imported a CSV file to Python using pandas. The file consists of 3 columns and 498 rows. I only need to have a word count for 1 column named "Description". I have cleaned the file by transforming the column "Description" to lower-case, removing english stopwords and splits.
IN:
import pandas as pd
df = pd.read_csv("capex_motscles.csv")
from nltk.corpus import stopwords
stop = stopwords.words('english')
Description3 = df['Description'].str.lower().apply(lambda x:
''.join([word for word in str(x).split() if word not in (stop)]))
print(Description3)
OUT:
0 crazy mind california medical service data base...
1 california licensed producer recreational & medic...
2 silicon valley data clients live beyond status...
3 mycrazynotes inc. announces $144.6 million expans...
4 leading provider sustainable energy company prod ...
5 livefreecompany founded 2005, listed new york stock...
I've provided 5 rows from "print(Description3)". I have 498 rows in total, and as mentioned, I need to count the word frequencies. Any help would be greatly appreciated, thank you for your time!