Python报错:AttributeError: ‘int‘ object has no attribute ‘decode‘

报错信息

 

 解决方法

根据报错信息开头的提示找到第50行代码:

data["content_cutted"] = data.content.apply(chinese_word_cut)

在该行代码前面加上:

data['content'] = data['content'].astype(str)