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

03-23 1158阅读

本文主要介绍了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属性时出现了问题。

原因分析:

AttributeError: ‘DataFrame‘ object has no attribute ‘iteritems‘解决方案【Bug已解决-Python】
是安装pandas时未指定固定版本,导致安装了最新的2.0.3,2.0以上的版本不支持iteritems了,所以报错
解决方案:安装pandas时指定2.0以下的版本,如:1.1.5

解决方案ÿ

VPS购买请点击我

文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

目录[+]