【发布时间】:2019-03-31 01:16:50
【问题描述】:
我有一个数据框,其中有一列包含文本数据。我想删除没有意义的单词,并将文本数据中的“不是”等否定转换为“不是”。因为当我删除标点符号时,“isn't”变为“isn t”,当我删除字母小于长度 2 的单词时,“t”将被完全删除。所以,我想做以下3个任务- 1)将“不是”之类的否定转换为“不是” 2)删除无意义的词 3) 删除长度小于 2 的字母 例如,df 列看起来与此类似-
user_id text data column
1 it's the coldest day
2 they aren't going
3 aa
4 how are you jkhf
5 v
6 ps
7 jkhf
输出应该是-
user_id text data column
1 it is the coldest day
2 they are not going
3
4 how are you
5
6
7
如何实现?
【问题讨论】:
标签: python-3.x nlp text-processing