python - 如何在numpy中创建一个数组来存储python中字符串的清理文本?
问题描述
#array for saving the cleaned text
normalized_corpus = numpy.full(fill_value='',shape=initiate.shape,dtype='str')
for k,text in enumerate(initiate.values):
#doing all text cleaning
text = lower(text)
text = lemmatize_text(text)
text = remove_special_characters(text)
normalized_corpus[k] = text
当我执行上面的代码时,我得到了以下错误。请帮帮我。
解决方案
推荐阅读
- java - Eclipse 调试器变量生命周期视图
- css - 在 CSS 中设置不同的淡入淡出时间
- java - startActivityForResult 在 Android Studio 中未显示为已弃用
- reactjs - React-leaflet-draw / 无法以编程方式访问 EditControl 组件
- amazon-polly - amazon Polly 提供重叠的单词语音标记 - 如何禁用?
- docker - docker buildkit 是否可以与已安装的 docker.sock 和 docker compose 一起使用?
- python - Having trouble saving an object with a foreign key in Django
- python - How to compare characters of strings that are elements of a list?
- django-rest-framework - Facebook Login Django Rest Auth gives "non_field_errors": [ "Incorrect value" ]
- wordpress - How to create a dynamic table in the administration panel of wordpress