您当前的位置: 首页 > 
  • 0浏览

    0关注

    2393博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

成功解决KeyError: “Passing list-likes to .loc or [] with any missing labels is no longer supported. The

一个处女座的程序猿 发布时间:2021-04-12 20:15:44 ,浏览量:0

成功解决KeyError: "Passing list-likes to .loc or [] with any missing labels is no longer supported. The following labels were missing: Index(['Item_Identifier'], dtype='object'). See https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike"

目录

解决问题

解决思路

解决方法

解决问题

  "Passing list-likes to .loc or [] with any missing labels " KeyError: "Passing list-likes to .loc or [] with any missing labels is no longer supported. The following labels were missing: Index(['Item_Identifier'], dtype='object'). See https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike"

解决思路

“将列表like传递给.loc或[],且没有任何标签” KeyError: "不再支持将列表类型传递给.loc或[],且不支持任何缺失的标签。以下标签缺失:Index(['Item_Identifier'], dtype='object')。 见https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html # deprecate-loc-reindex-listlike”

解决方法

在执行loc函数的时候,数据集中不存在指定的字段,请重新查看当前的字段是否被删除或者重命名,亦或者根本没有该字段!

 

关注
打赏
1664196048
查看更多评论
立即登录/注册

微信扫码登录

0.3324s