我尝试了多种方法来转换数据框上的列之一。但是什么都没用。
第一次尝试
false
它向我显示错误:“ ValueError:以10为底的int()的无效文字:'favorite_count'”
第二次尝试
df['favorite_count'].astype(str).astype(int)
它向我显示错误:ValueError:无法将非有限值(NA或inf)转换为整数
我使用tweet api从twitter下载了数据,并保存在csv文件中。
请帮助我解决问题。谢谢