【发布时间】:2020-05-16 09:15:33
【问题描述】:
当我尝试使用 pandas 数据框的 .ix 属性拉出一列时出现此错误,例如df.ix[:, 'col_header'].
AttributeError: 'DataFrame' object has no attribute 'ix'
该脚本今天早上可以运行,但今天下午我在全新安装了 Pandas 的新 Linux 环境中运行它。有没有其他人见过这个错误?我已经在这里和其他地方搜索过,但找不到。
【问题讨论】:
-
您运行的是旧版本的 pandas。看到这个了吗? *.com/questions/43838999/pandas-replacement-for-ix