AttributeError: ‘DataFrame‘ object has no attribute ‘iteritems‘解决方案【Bug已解决-Python】

本文主要介绍了AttributeError: ‘DataFrame‘ object has no attribute ‘iteritems‘解决方案,希望能对大家有所帮助。

项目场景:

今天在运行项目时,却出现AttributeError: ‘DataFrame‘ object has no attribute ‘iteritems‘的错误提示,具体报错信息如下所示:

AttributeError: ‘DataFrame‘ object has no attribute ‘iteritems‘

问题描述

在项目运行过程中,出现了AttributeError: ‘DataFrame‘ object has no attribute ‘iteritems‘的错误提示。具体的错误信息如下所示:

AttributeError: ‘DataFrame‘ object has no attribute ‘iteritems‘

这个错误表明在尝试使用DataFrame对象的iteritems属性时出现了问题。

原因分析:


是安装pandas时未指定固定版本,导致安装了最新的2.0.3,2.0以上的版本不支持iteritems了,所以报错
解决方案:安装pandas时指定2.0以下的版本,如:1.1.5

解决方案ÿ

版权声明:本文为博主作者:一键难忘原创文章,版权归属原作者,如果侵权,请联系我们删除!

原文链接:https://blog.csdn.net/weixin_52908342/article/details/136883385

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
xiaoxingxing的头像xiaoxingxing管理团队
上一篇 2024年4月10日
下一篇 2024年4月10日

相关推荐