在运行我的代码时,我会得到这个错误。
text = str(text.encode("utf-8")) AttributeError:'float‘对象没有属性'encode’
我试图使用df'Translated_message'=df'Translated_message'.values.astype('string')将数据转换为字符串,但这不起作用。
发布于 2022-11-19 21:24:38
文本是一个浮点。在编码之前,检查强制转换为str。
https://stackoverflow.com/questions/74503855
复制相似问题