From 41df40f6bbdf194a247cbe996e7c84bdefa2946d Mon Sep 17 00:00:00 2001 From: rootphantomer Date: Tue, 1 Aug 2023 11:44:27 +0800 Subject: [PATCH] =?UTF-8?q?bond.get=5Fall=5Fbase=5Finfo()=20=E5=8F=AF?= =?UTF-8?q?=E8=BD=AC=E5=80=BA=E7=9A=84=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BC=9A=E5=87=BA=E7=8E=B0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=E7=9A=84=E6=83=85=E5=86=B5=20Fixes=20#141?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- efinance/bond/getter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/efinance/bond/getter.py b/efinance/bond/getter.py index 955e890..c5d1b15 100644 --- a/efinance/bond/getter.py +++ b/efinance/bond/getter.py @@ -162,7 +162,7 @@ def get_all_base_info() -> pd.DataFrame: columns = EASTMONEY_BOND_BASE_INFO_FIELDS while 1: params = ( - ('sortColumns', 'PUBLIC_START_DATE'), + ('sortColumns', 'SECURITY_CODE'), ('sortTypes', '-1'), ('pageSize', '500'), ('pageNumber', f'{page}'), @@ -295,7 +295,8 @@ def get_quote_history( df.rename(columns={'代码': '债券代码', '名称': '债券名称'}, inplace=True) elif isinstance(df, dict): for bond_code in df.keys(): - df[bond_code].rename(columns={'代码': '债券代码', '名称': '债券名称'}, inplace=True) + df[bond_code].rename( + columns={'代码': '债券代码', '名称': '债券名称'}, inplace=True) return df