I want to remove stop words and punctuations in Amazon_baby.csv
.
import pandas as pd
data=pd.read_csv('amazon_baby.csv)
data.fillna(value='',inplace=True)
data.head()
import string
from nltk.corpus import stopwords
def text_process(msg):
no_punc=[char for char in msg if char not string.punctuation]
no_punc=''.join(no_punc)
return [word for word in no_punc.split() if word.lower() not in stopwords.words('English')]
data['review'].apply(text_process)
This code executing upto 10k rows , if apply on entire dataset kernel always showing as busy and cell is not executing .
Please help on this.
Find the data set here.