代码不适用于列CONTENT的每一行中的停用词

时间:2019-08-07 09:26:43

标签: python pandas pycharm

此行不会从CONTENT列的每一行中删除停用词

 df = pd.read_csv (r'C:\Users\mukesh_gupta\PycharmProjects\Doc_analysis\src\student99.csv')

df.columns = ["FILE", "EXT", "CONTENT", "CATEGORY"]
df['CONTENT'] = df['CONTENT'].apply(lambda x: ' '.join([word for word in x.split() if word not in (stop)]))

0 个答案:

没有答案