Pandas DataFrame 转 Spark DataFrame报错:AttributeError_ ‘DataFrame‘ object has no attribute ‘iteritems‘
处理方案如下,根据自身需求选择:- 降低 pandas 版本:`pip install pandas==1.5.3`- 用 items() 替换 iteritems():`pd.DataFrame.iteritems = pd.DataFrame.items`- 升级 spark 版本:下载链接:[https://spark.apache.org/downloads.html](https://spark.apache.org/downloads.html)
原创
2024-01-27 11:47:14 ·
1371 阅读 ·
1 评论