diff --git a/akshare/__init__.py b/akshare/__init__.py index bbc854a2ec2d..6c9ee2ae8d00 100644 --- a/akshare/__init__.py +++ b/akshare/__init__.py @@ -2563,15 +2563,23 @@ 1.11.47 add: add akracer 0.0.8 support 1.11.48 fix: fix installation.md 1.11.49 add: add aarch64 support +1.11.50 fix: fix amac_fund_abs support """ -__version__ = "1.11.49" +__version__ = "1.11.50" __author__ = "AKFamily" import sys - import warnings +import pandas as pd + +pd_main_version = int(pd.__version__.split('.')[0]) +if pd_main_version < 2: + warnings.warn( + "为了支持更多特性,请将 Pandas 升级到 2.1.0 及以上版本!" + ) + if sys.version_info < (3, 9): warnings.warn( "为了支持更多特性,请将 Python 升级到 3.9 及以上版本!" diff --git a/akshare/fund/fund_amac.py b/akshare/fund/fund_amac.py index 80a95641b023..a458e256fbab 100644 --- a/akshare/fund/fund_amac.py +++ b/akshare/fund/fund_amac.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding:utf-8 -*- """ -Date: 2023/4/3 20:48 +Date: 2023/10/25 16:30 Desc: 中国证券投资基金业协会-信息公示数据 中国证券投资基金业协会-新版: https://gs.amac.org.cn """ @@ -64,7 +64,7 @@ def amac_member_info() -> pd.DataFrame: r = requests.post(url, params=params, json={}, verify=False) data_json = r.json() temp_df = pd.DataFrame(data_json["content"]) - big_df = big_df.append(temp_df, ignore_index=True) + big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True) keys_list = [ "managerName", "memberBehalf", @@ -124,7 +124,7 @@ def amac_person_fund_org_list(symbol: str = "公募基金管理公司") -> pd.Da ) data_json = r.json() temp_df = pd.DataFrame(data_json["content"]) - big_df = big_df.append(temp_df, ignore_index=True) + big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True) keys_list = [ "orgName", "orgType", @@ -214,7 +214,7 @@ def amac_manager_info() -> pd.DataFrame: r = requests.post(url, params=params, json={}, verify=False) data_json = r.json() temp_df = pd.DataFrame(data_json["content"]) - big_df = big_df.append(temp_df, ignore_index=True) + big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True) keys_list = [ "managerName", "artificialPersonName", @@ -267,7 +267,7 @@ def amac_manager_classify_info() -> pd.DataFrame: r = requests.post(url, params=params, json={}, verify=False) data_json = r.json() temp_df = pd.DataFrame(data_json["content"]) - big_df = pd.concat([big_df, temp_df], ignore_index=True) + big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True) keys_list = [ "managerName", "artificialPersonName", @@ -333,7 +333,7 @@ def amac_member_sub_info() -> pd.DataFrame: r = requests.post(url, params=params, json={}, verify=False) data_json = r.json() temp_df = pd.DataFrame(data_json["content"]) - big_df = big_df.append(temp_df, ignore_index=True) + big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True) keys_list = [ "managerName", "memberBehalf", @@ -442,7 +442,7 @@ def amac_securities_info() -> pd.DataFrame: r = requests.post(url, params=params, json={}, verify=False) data_json = r.json() temp_df = pd.DataFrame(data_json["content"]) - big_df = big_df.append(temp_df, ignore_index=True) + big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True) keys_list = [ "cpmc", "cpbm", @@ -495,7 +495,7 @@ def amac_aoin_info() -> pd.DataFrame: r = requests.post(url, params=params, json={}, verify=False) data_json = r.json() temp_df = pd.DataFrame(data_json["content"]) - big_df = big_df.append(temp_df, ignore_index=True) + big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True) keys_list = [ "code", "name", @@ -539,7 +539,7 @@ def amac_fund_sub_info() -> pd.DataFrame: r = requests.post(url, params=params, json={}, verify=False) data_json = r.json() temp_df = pd.DataFrame(data_json["content"]) - big_df = big_df.append(temp_df, ignore_index=True) + big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True) keys_list = [ "productCode", "productName", @@ -586,7 +586,7 @@ def amac_fund_account_info() -> pd.DataFrame: r = requests.post(url, params=params, json={}, verify=False) data_json = r.json() temp_df = pd.DataFrame(data_json["content"]) - big_df = big_df.append(temp_df, ignore_index=True) + big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True) keys_list = [ "registerDate", "registerCode", @@ -628,7 +628,7 @@ def amac_fund_abs() -> pd.DataFrame: r = requests.post(url, params=params, json={}, verify=False) data_json = r.json() temp_df = pd.DataFrame(data_json["content"]) - big_df = big_df.append(temp_df, ignore_index=True) + big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True) big_df.reset_index(inplace=True) big_df["index"] = range(1, len(big_df) + 1) big_df.columns = [ @@ -686,7 +686,7 @@ def amac_futures_info() -> pd.DataFrame: r = requests.post(url, params=params, json={}, verify=False) data_json = r.json() temp_df = pd.DataFrame(data_json["content"]) - big_df = big_df.append(temp_df, ignore_index=True) + big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True) keys_list = [ "mpiName", "mpiProductCode", @@ -743,7 +743,7 @@ def amac_manager_cancelled_info() -> pd.DataFrame: r = requests.post(url, params=params, json={}, verify=False) data_json = r.json() temp_df = pd.DataFrame(data_json["content"]) - big_df = big_df.append(temp_df, ignore_index=True) + big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True) keys_list = [ "orgName", "orgCode", diff --git a/docs/changelog.md b/docs/changelog.md index 097a77e67f39..309e5b0358dd 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -68,6 +68,10 @@ ## 更新说明详情 +1.11.50 fix: fix amac_fund_abs support + + 1. 修复 amac_fund_abs 接口 + 1.11.49 add: add aarch64 support 1. 新增 aarch64 支持 @@ -3038,6 +3042,8 @@ ## 版本更新说明 +1.11.50 fix: fix amac_fund_abs support + 1.11.49 add: add aarch64 support 1.11.48 fix: fix installation.md diff --git a/docs/introduction.md b/docs/introduction.md index 5ac50dce3470..5d919a6e1b51 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -6,7 +6,7 @@ **风险提示:[AKShare](https://github.com/akfamily/akshare) 开源财经数据接口库所采集的数据皆来自公开的数据源,不涉及任何个人隐私数据和非公开数据。 同时本项目提供的数据接口及相关数据仅用于学术研究,任何个人、机构及团体使用本项目的数据接口及相关数据请注意商业风险。** -1. 本文档更新时间:**2023-10-24**; +1. 本文档更新时间:**2023-10-25**; 2. 如有 [AKShare](https://github.com/akfamily/akshare) 库、文档及数据的相关问题,请在 [AKShare Issues](https://github.com/akfamily/akshare/issues) 中提 Issues; 3. 欢迎关注 **数据科学实战** 微信公众号:
; 4. 如果您的问题未能在文档中找到答案,您也可以加入 **AKShare-VIP QQ 群**: 为了提高问答质量,此群为收费群(一杯咖啡钱即可入群,赠送[《AKShare-初阶-使用教学》](https://zmj.xet.tech/s/wck86)视频课),可以添加 **AKShare-小助手** QQ:1254836886,由小助手邀请入群! ![](https://jfds-1252952517.cos.ap-chengdu.myqcloud.com/akshare/readme/qrcode/qr_code_1254836886.jpg)