import nltk nltk.download('stopwords') from nltk.corpus import stopwords stop_words = stopwords.words('english') df[stopwordsd] = df['textl'].apply(lambda x: ' '.join([word for word in x.split( ) if word not in (stop_words) ]))
We will remove all the stop words from the text using the above code.