Skip to content

Commit

Permalink
fix: fix stock_hot_rank_relate_em
Browse files Browse the repository at this point in the history
  • Loading branch information
albertandking committed Sep 30, 2024
1 parent 879929c commit 47e4b6b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion akshare/stock/stock_hot_rank_em.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Desc: 东方财富个股人气榜
https://guba.eastmoney.com/rank/
"""

import pandas as pd
import requests

Expand Down Expand Up @@ -190,7 +191,7 @@ def stock_hot_rank_relate_em(symbol: str = "SZ000665") -> pd.DataFrame:
temp_df.columns = ["时间", "-", "股票代码", "-", "相关股票代码", "涨跌幅", "-"]
temp_df = temp_df[["时间", "股票代码", "相关股票代码", "涨跌幅"]]
temp_df["涨跌幅"] = temp_df["涨跌幅"].str.strip("%")
temp_df["涨跌幅"] = pd.to_numeric(temp_df["涨跌幅"])
temp_df["涨跌幅"] = pd.to_numeric(temp_df["涨跌幅"], errors="coerce")
return temp_df


Expand Down
22 changes: 11 additions & 11 deletions docs/data/stock/stock.md
Original file line number Diff line number Diff line change
Expand Up @@ -21339,17 +21339,17 @@ print(stock_hot_rank_relate_em_df)
数据示例

```
时间 股票代码 相关股票代码 涨跌幅
0 2022-02-28 12:00:00 SZ000665 SH601789 9.41
1 2022-02-28 12:00:00 SZ000665 SH600996 8.76
2 2022-02-28 12:00:00 SZ000665 SZ002432 8.28
3 2022-02-28 12:00:00 SZ000665 SZ002104 7.25
4 2022-02-28 12:00:00 SZ000665 SH603123 6.75
5 2022-02-28 12:00:00 SZ000665 SH600096 4.52
6 2022-02-28 12:00:00 SZ000665 SZ002349 4.45
7 2022-02-28 12:00:00 SZ000665 SZ002354 3.72
8 2022-02-28 12:00:00 SZ000665 SZ000815 3.69
9 2022-02-28 12:00:00 SZ000665 SZ002530 3.46
时间 股票代码 相关股票代码 涨跌幅
0 2024-09-30 20:00:00 SZ000665 SZ300059 6.18
1 2024-09-30 20:00:00 SZ000665 SZ000158 4.46
2 2024-09-30 20:00:00 SZ000665 SH600519 2.71
3 2024-09-30 20:00:00 SZ000665 SH601162 2.29
4 2024-09-30 20:00:00 SZ000665 SZ000595 2.01
5 2024-09-30 20:00:00 SZ000665 SZ002717 1.72
6 2024-09-30 20:00:00 SZ000665 SZ300085 1.72
7 2024-09-30 20:00:00 SZ000665 SZ301551 1.59
8 2024-09-30 20:00:00 SZ000665 SZ000002 1.54
9 2024-09-30 20:00:00 SZ000665 SZ000980 1.50
```

### 盘口异动
Expand Down

0 comments on commit 47e4b6b

Please sign in to comment.