Dia*_*rts 74 python dataframe pandas
当我尝试使用 Pandas 数据框的 .ix 属性拉出一列时出现此错误,例如df.ix[:, 'col_header']
。
AttributeError: 'DataFrame' object has no attribute 'ix'
Run Code Online (Sandbox Code Playgroud)
该脚本今天早上工作,但今天下午我在新安装的 Pandas 的新 Linux 环境中运行它。有没有其他人见过这个错误?我在这里和其他地方搜索过,但找不到。
Dr_*_*ope 76
尝试 df.iloc[:, integer]
.ix
已弃用
顺便说一句,df.loc[:,'col_header']
用于 str 或布尔索引
ALo*_*llz 26
今天(2020 年 1 月 30 日)全新安装将安装pd.__version__ == '1.0.0'
. 随之而来的是删除了许多已弃用的功能。
删除了 Series.ix 和 DataFrame.ix(GH26438)