akfamily / akshare

AKShare is an elegant and simple financial data interface library for Python, built for human beings! 开源财经数据接口库
https://akshare.akfamily.xyz
MIT License
9.23k stars 1.87k forks source link

stock_zh_kcb_report_em适配高版本pandas #5055

Closed Hellohistory closed 3 months ago

Hellohistory commented 3 months ago

在pandas2.2.2当中使用stock_zh_kcb_report_em获取科创板公告会返回 Traceback (most recent call last): File "E:\Code\Finowth\FinData\original_test.py", line 3, in stock_zh_kcb_report_em_df = ak.stock_zh_kcb_report_em(from_page=1, to_page=100) File "E:\Code\Finowth\FinData.venv\lib\site-packages\akshare\stock\stock_zh_kcb_report.py", line 79, in stock_zh_kcb_report_em big_df = big_df.append(temp_df, ignore_index=True) File "E:\Code\Finowth\FinData.venv\lib\site-packages\pandas\core\generic.py", line 6299, in getattr return object.getattribute(self, name) AttributeError: 'DataFrame' object has no attribute 'append' 因此修改该部分,已在低版本pandas实验无问题

albertandking commented 3 months ago

在pandas2.2.2当中使用stock_zh_kcb_report_em获取科创板公告会返回 Traceback (most recent call last): File "E:\Code\Finowth\FinData\original_test.py", line 3, in stock_zh_kcb_report_em_df = ak.stock_zh_kcb_report_em(from_page=1, to_page=100) File "E:\Code\Finowth\FinData.venv\lib\site-packages\akshare\stock\stock_zh_kcb_report.py", line 79, in stock_zh_kcb_report_em big_df = big_df.append(temp_df, ignore_index=True) File "E:\Code\Finowth\FinData.venv\lib\site-packages\pandas\core\generic.py", line 6299, in getattr return object.getattribute(self, name) AttributeError: 'DataFrame' object has no attribute 'append' 因此修改该部分,已在低版本pandas实验无问题

感谢反馈问题,已调整相关代码