我有以下字符串:
"hello, I'm going to eat to the fullest today hhhhhhhhhhhhhhhhhhhhh"
我收集了很多这样的tweet,并将它们分配到一个数据帧。我如何通过删除“hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh?你知道吗
我后来也在使用countVectorizer,所以有很多词汇表都包含了“hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
使用正则表达式。你知道吗
例如:
输出:
你可以试试这个:
在我的案例4中,您可以设置要匹配的字符数。你知道吗
我使用unicode匹配,因为你提到你在推特上。你知道吗
相关问题 更多 >
编程相关推荐