本文主要介紹了AttributeError: ‘DataFrame‘ object has no attribute ‘iteritems‘解決方案,希望能對大家有所幫助。
項目場景:
今天在運行項目時,卻出現(xiàn)AttributeError: ‘DataFrame‘ object has no attribute ‘iteritems‘的錯誤提示,具體報錯信息如下所示:
AttributeError: ‘DataFrame‘ object has no attribute ‘iteritems‘
問題描述
在項目運行過程中,出現(xiàn)了AttributeError: ‘DataFrame‘ object has no attribute ‘iteritems‘
的錯誤提示。具體的錯誤信息如下所示:
AttributeError: ‘DataFrame‘ object has no attribute ‘iteritems‘
這個錯誤表明在嘗試使用DataFrame對象的iteritems
屬性時出現(xiàn)了問題。文章來源:http://www.zghlxwxcb.cn/news/detail-842618.html
原因分析:
是安裝pandas時未指定固定版本,導(dǎo)致安裝了最新的2.0.3,2.0以上的版本不支持iteritems了,所以報錯
解決方案:安裝pandas時指定2.0以下的版本,如:1.1.5文章來源地址http://www.zghlxwxcb.cn/news/detail-842618.html
解決方案?
到了這里,關(guān)于AttributeError: ‘DataFrame‘ object has no attribute ‘iteritems‘解決方案【Bug已解決-Python】的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!