akshare 1.15.67__py3-none-any.whl → 1.15.68__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of akshare might be problematic. Click here for more details.

akshare/__init__.py CHANGED
@@ -2977,9 +2977,10 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
2977
2977
  1.15.65 fix: fix option_czce_daily interface
2978
2978
  1.15.66 fix: fix fund_etf_dividend_sina interface
2979
2979
  1.15.67 fix: fix stock_hold_change_cninfo interface
2980
+ 1.15.68 fix: fix stock_research_report_em interface
2980
2981
  """
2981
2982
 
2982
- __version__ = "1.15.67"
2983
+ __version__ = "1.15.68"
2983
2984
  __author__ = "AKFamily"
2984
2985
 
2985
2986
  import sys
@@ -1,13 +1,15 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding:utf-8 -*-
3
3
  """
4
- Date: 2023/8/20 20:00
4
+ Date: 2025/1/9 21:35
5
5
  Desc: 东方财富网-数据中心-研究报告-个股研报
6
6
  https://data.eastmoney.com/report/stock.jshtml
7
7
  """
8
+
8
9
  import pandas as pd
9
10
  import requests
10
- from tqdm import tqdm
11
+
12
+ from akshare.utils.tqdm import get_tqdm
11
13
 
12
14
 
13
15
  def stock_research_report_em(symbol: str = "000001") -> pd.DataFrame:
@@ -40,7 +42,9 @@ def stock_research_report_em(symbol: str = "000001") -> pd.DataFrame:
40
42
  r = requests.get(url, params=params)
41
43
  data_json = r.json()
42
44
  total_page = data_json["TotalPage"]
45
+ current_year = data_json["currentYear"]
43
46
  big_df = pd.DataFrame()
47
+ tqdm = get_tqdm()
44
48
  for page in tqdm(range(1, total_page + 1), leave=False):
45
49
  params.update(
46
50
  {
@@ -53,9 +57,15 @@ def stock_research_report_em(symbol: str = "000001") -> pd.DataFrame:
53
57
  r = requests.get(url, params=params)
54
58
  data_json = r.json()
55
59
  temp_df = pd.DataFrame(data_json["data"])
56
- big_df = pd.concat([big_df, temp_df], axis=0, ignore_index=True)
60
+ big_df = pd.concat(objs=[big_df, temp_df], axis=0, ignore_index=True)
57
61
  big_df.reset_index(inplace=True)
58
62
  big_df["index"] = big_df["index"] + 1
63
+ predict_this_year_eps_title = f"{current_year}-盈利预测-收益"
64
+ predict_this_year_pe_title = f"{current_year}-盈利预测-市盈率"
65
+ predict_next_year_eps_title = f"{current_year + 1}-盈利预测-收益"
66
+ predict_next_year_pe_title = f"{current_year + 1}-盈利预测-市盈率"
67
+ predict_next_two_year_eps_title = f"{current_year + 2}-盈利预测-收益"
68
+ predict_next_two_year_pe_title = f"{current_year + 2}-盈利预测-市盈率"
59
69
  big_df.rename(
60
70
  columns={
61
71
  "index": "序号",
@@ -68,12 +78,12 @@ def stock_research_report_em(symbol: str = "000001") -> pd.DataFrame:
68
78
  "publishDate": "日期",
69
79
  "infoCode": "-",
70
80
  "column": "-",
71
- "predictNextTwoYearEps": "-",
72
- "predictNextTwoYearPe": "-",
73
- "predictNextYearEps": "2024-盈利预测-收益",
74
- "predictNextYearPe": "2024-盈利预测-市盈率",
75
- "predictThisYearEps": "2023-盈利预测-收益",
76
- "predictThisYearPe": "2023-盈利预测-市盈率",
81
+ "predictNextTwoYearEps": predict_next_two_year_eps_title,
82
+ "predictNextTwoYearPe": predict_next_two_year_pe_title,
83
+ "predictNextYearEps": predict_next_year_eps_title,
84
+ "predictNextYearPe": predict_next_year_pe_title,
85
+ "predictThisYearEps": predict_this_year_eps_title,
86
+ "predictThisYearPe": predict_this_year_pe_title,
77
87
  "predictLastYearEps": "-",
78
88
  "predictLastYearPe": "-",
79
89
  "actualLastTwoYearEps": "-",
@@ -122,20 +132,38 @@ def stock_research_report_em(symbol: str = "000001") -> pd.DataFrame:
122
132
  "东财评级",
123
133
  "机构",
124
134
  "近一月个股研报数",
125
- "2023-盈利预测-收益",
126
- "2023-盈利预测-市盈率",
127
- "2024-盈利预测-收益",
128
- "2024-盈利预测-市盈率",
135
+ predict_this_year_eps_title,
136
+ predict_this_year_pe_title,
137
+ predict_next_year_eps_title,
138
+ predict_next_year_pe_title,
139
+ predict_next_two_year_eps_title,
140
+ predict_next_two_year_pe_title,
129
141
  "行业",
130
142
  "日期",
131
143
  ]
132
144
  ]
133
145
  big_df["日期"] = pd.to_datetime(big_df["日期"], errors="coerce").dt.date
134
- big_df["近一月个股研报数"] = pd.to_numeric(big_df["近一月个股研报数"], errors="coerce")
135
- big_df["2023-盈利预测-收益"] = pd.to_numeric(big_df["2023-盈利预测-收益"], errors="coerce")
136
- big_df["2023-盈利预测-市盈率"] = pd.to_numeric(big_df["2023-盈利预测-市盈率"], errors="coerce")
137
- big_df["2024-盈利预测-收益"] = pd.to_numeric(big_df["2024-盈利预测-收益"], errors="coerce")
138
- big_df["2024-盈利预测-市盈率"] = pd.to_numeric(big_df["2024-盈利预测-市盈率"], errors="coerce")
146
+ big_df["近一月个股研报数"] = pd.to_numeric(
147
+ big_df["近一月个股研报数"], errors="coerce"
148
+ )
149
+ big_df[predict_this_year_eps_title] = pd.to_numeric(
150
+ big_df[predict_this_year_eps_title], errors="coerce"
151
+ )
152
+ big_df[predict_this_year_pe_title] = pd.to_numeric(
153
+ big_df[predict_this_year_pe_title], errors="coerce"
154
+ )
155
+ big_df[predict_next_year_eps_title] = pd.to_numeric(
156
+ big_df[predict_next_year_eps_title], errors="coerce"
157
+ )
158
+ big_df[predict_next_year_pe_title] = pd.to_numeric(
159
+ big_df[predict_next_year_pe_title], errors="coerce"
160
+ )
161
+ big_df[predict_next_two_year_eps_title] = pd.to_numeric(
162
+ big_df[predict_next_two_year_eps_title], errors="coerce"
163
+ )
164
+ big_df[predict_next_two_year_pe_title] = pd.to_numeric(
165
+ big_df[predict_next_two_year_pe_title], errors="coerce"
166
+ )
139
167
  return big_df
140
168
 
141
169
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: akshare
3
- Version: 1.15.67
3
+ Version: 1.15.68
4
4
  Summary: AKShare is an elegant and simple financial data interface library for Python, built for human beings!
5
5
  Home-page: https://github.com/akfamily/akshare
6
6
  Author: AKFamily
@@ -37,6 +37,18 @@ Provides-Extra: full
37
37
  Requires-Dist: akqmt; extra == "full"
38
38
  Provides-Extra: qmt
39
39
  Requires-Dist: akqmt; extra == "qmt"
40
+ Dynamic: author
41
+ Dynamic: author-email
42
+ Dynamic: classifier
43
+ Dynamic: description
44
+ Dynamic: description-content-type
45
+ Dynamic: home-page
46
+ Dynamic: keywords
47
+ Dynamic: license
48
+ Dynamic: provides-extra
49
+ Dynamic: requires-dist
50
+ Dynamic: requires-python
51
+ Dynamic: summary
40
52
 
41
53
  **欢迎加入专注于财经数据和量化投资的知识社区,请点击[了解更多](https://akshare.akfamily.xyz/learn.html)**
42
54
 
@@ -1,4 +1,4 @@
1
- akshare/__init__.py,sha256=iHal0YVSSEaZA2Utd3s3IAKHnWDM9vY_IJKapTYwNKs,185840
1
+ akshare/__init__.py,sha256=nDjQ0YwguxGlJLLrsigRdQM_YyM2gk4JhLFaNJesmEs,185892
2
2
  akshare/datasets.py,sha256=rKuRNZrqi6IMsZ9nyvO3Rx02js0tH3zMLjz8HQNAoPQ,963
3
3
  akshare/exceptions.py,sha256=WEJjIhSmJ_xXNW6grwV4nufE_cfmmyuhmueVGiN1VAg,878
4
4
  akshare/request.py,sha256=HtFFf9MhfEibR-ETWe-1Tts6ELU4VKSqA-ghaXjegQM,4252
@@ -330,7 +330,7 @@ akshare/stock_feature/stock_market_legu.py,sha256=_LeyGUGyZFeD-1fnJPc4eIQkeoWAmo
330
330
  akshare/stock_feature/stock_pankou_em.py,sha256=A3lu1hKddXwMFo9vKPLCQfL3Zh77xr2IbcAtKs8Lc9Y,5599
331
331
  akshare/stock_feature/stock_qsjy_em.py,sha256=7EHroLZC3-X_3WNhb7GV9MPQHbxjtkfKI_YEbTvnSb0,3913
332
332
  akshare/stock_feature/stock_report_em.py,sha256=jhePrTKGIYzdz8idiPoDs1vEajd73XRIFpZyWQggKa4,18075
333
- akshare/stock_feature/stock_research_report_em.py,sha256=XFQadpUI2l0-Ik8BQWf-eCC4uFC1xxt9VNiZ9NU2zp0,4888
333
+ akshare/stock_feature/stock_research_report_em.py,sha256=z6nsoai1wUK5EfMoef-7KBd-BqqAGgKdoR01qukWBwk,5900
334
334
  akshare/stock_feature/stock_sns_sseinfo.py,sha256=TGGLw5P77Hh-sSHgw_KKoK29d1m_V_2GDQXe9m_XFew,4556
335
335
  akshare/stock_feature/stock_sy_em.py,sha256=GysP1WvPpqCLhbCRXH5sxwmXCPYvgtbJYQ_jltDqaA0,17721
336
336
  akshare/stock_feature/stock_technology_ths.py,sha256=4u9z7H6MYEutOYAQvYfzgc_FxG6XlhkMLujSotAbraw,30827
@@ -378,8 +378,8 @@ akshare/utils/token_process.py,sha256=K4rGXjh_tgugbRcyOK2h2x0jP3PT65IIK7nxhUKhOe
378
378
  akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
379
379
  tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
380
380
  tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
381
- akshare-1.15.67.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
382
- akshare-1.15.67.dist-info/METADATA,sha256=QP-7VeWE73Os58p3_RxV1KcWzBmnwc9qsSEfDNIZul8,13423
383
- akshare-1.15.67.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
384
- akshare-1.15.67.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
385
- akshare-1.15.67.dist-info/RECORD,,
381
+ akshare-1.15.68.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
382
+ akshare-1.15.68.dist-info/METADATA,sha256=mJRpdmFzUtCoaXKb9LEdXsuZm61ra36h67V7FyY7py4,13679
383
+ akshare-1.15.68.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
384
+ akshare-1.15.68.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
385
+ akshare-1.15.68.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.7.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5