Skip to content

Commit 17123f2

Browse files
committed
修复 stock 模块的 get_base_info 函数的 bug
1 parent 560ab76 commit 17123f2

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

changelog.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
# Changelog
22

3+
## v0.4.8(2022-06-30)
4+
5+
### Fixed
6+
7+
- 修复 `stock` 模块的 `get_base_info` 函数的 bug
8+
39
## v0.4.7(2022-06-24)
410

5-
## Added
11+
### Added
612

713
- 添加获取近 n 日 1 分钟 K 线的功能
814

9-
## Fixed
15+
### Fixed
1016

1117
- 修复部分函数命名拼写错误
1218

efinance/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__title__ = 'efinance'
2-
__version__ = '0.4.7'
2+
__version__ = '0.4.8'
33
__author__ = 'micro sheep'
44
__url__ = 'https://github.com/Micro-sheep/efinance'
55
__author_email__ = 'micro-sheep@outlook.com'

efinance/stock/getter.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ def get_base_info_single(stock_code: str) -> pd.Series:
5454
secid = get_quote_id(stock_code)
5555
if not secid:
5656
return pd.Series(index=EASTMONEY_STOCK_BASE_INFO_FIELDS.values(), dtype='object')
57-
return get_base_info_for_stock(secid)
57+
return get_base_info_for_stock(secid).rename(index={
58+
'代码': '股票代码',
59+
'名称': '股票名称'
60+
})
5861

5962

6063
def get_base_info_muliti(stock_codes: List[str]) -> pd.DataFrame:

0 commit comments

Comments
 (0)