'DataFrame' object has no attribute '_append'
时间: 2023-08-02 22:12:01 浏览: 145
这个错误是因为在pandas 2.0中,'DataFrame'对象的'append'方法已被弃用。可以使用以下代码进行替代:df = pd.concat(\[df, pd.DataFrame(\[res\])\], ignore_index=True) \[2\]。这样可以将两个DataFrame对象进行拼接。如果你想了解更多关于DataFrame对象拼接的信息,可以参考这篇文章:Pandas数据连接、合并、加入、添加、重构函数(merge、concat、join、append、stack、unstack)\[3\]。
#### 引用[.reference_title]
- *1* [解决AttributeError: ‘DataFrame‘ object has no attribute ‘append](https://blog.csdn.net/wang_jiezeng/article/details/130059871)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [AttributeError: ‘DataFrame‘ object has no attribute ‘append‘ 解决方案](https://blog.csdn.net/dream6985/article/details/130760284)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [已解决AttributeError: ‘DataFrame‘ object has no attribute ‘append](https://blog.csdn.net/yuan2019035055/article/details/130577543)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文