首页 > 解决方案 > 错误消息:超出 IOPub 数据速率。从列表中提取字符串时

问题描述

再会,

我正在编写一个函数来预处理字符串数据。我希望将字符串数据小写。我试图通过传入一个名为 messages 的列表来测试该函数,该列表是一个字符串列表。但是,当我调用该函数时,我不断收到此错误:

IOPub data rate exceeded.
The notebook server will temporarily stop sending output
to the client in order to avoid crashing it.
To change this limit, set the config variable
`--NotebookApp.iopub_data_rate_limit`.

Current values:
NotebookApp.iopub_data_rate_limit=1000000.0 (bytes/sec)
NotebookApp.rate_limit_window=3.0 (secs)

这是我的功能:

def text_preprocess(message)
""" message: the text data to be processed """

words = ''.join(str(twit.lower()) for twit in message)

return words 

# Testing the function on a list of strings called messages

test = text_preprocess(messages)

# Length of the list messages
print(len(messages))
Output: 1548000

我很困惑为什么会出现该消息?这里的任何建议将不胜感激。谢谢

标签: pythonregextextnlp

解决方案


推荐阅读