我从 CSV 文件中读取数据,几乎所有列都是对象类型。如何将它们转换为 int. 我尝试了几种选择,但没有成功。CSV 文件在图像中。我对纬度和经度列特别感兴趣。df = pd.read_csv('file'.csv)de.head()df.dtypeslistings objecturl objectguests objectbedrooms int64beds int64bathrooms int64room_type objectprice float64host_name objectreviews int64stars float64location objectlatitude objectlongitude objectdtype: object
添加回答
举报
0/150
提交
取消