[英]reading large string and split each word taking too much time in python
I am reading a dataframe column having comments. 我正在阅读有评论的数据框列。 The data is taking forever to read using the code below.
使用下面的代码将永远读取数据。 Is there a way to make this faster ?
有没有办法使它更快?
for val in df.Description:
val = str(val)
tokens = val.split()
for i in range(len(tokens)):
tokens[i] = tokens[i].lower()
for words in tokens:
comment = comment + words + ''
df.Description is a column of comments (basically email text) df.Description是一列评论(主要是电子邮件文本)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.