这个错误提示表明 DataFrame 对象中没有名为 SalePrice 的属性。可能的原因是 train_data 中没有 SalePrice 这一列或者列名不是 SalePrice。你需要检查一下 train_data 中的列名,确保列名正确,然后再运行代码。

train_labels = torchtensortrain_dataSalePricevaluesreshape-1 1 dtype=torchfloat32运行时这行代码显示错误:AttributeError DataFrame object has no attribute SalePrice怎么修改

原文地址: https://www.cveoy.top/t/topic/ezNQ 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录