akshare 1.14.73__py3-none-any.whl → 1.14.76__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
@@ -2884,9 +2884,12 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
2884
2884
  1.14.71 fix: fix stock_mda_ym interface
2885
2885
  1.14.72 fix: fix fund_etf_hist_min_em interface
2886
2886
  1.14.73 fix: fix stock_gpzy_profile_em interface
2887
+ 1.14.74 fix: fix stock_gpzy_pledge_ratio_em interface
2888
+ 1.14.75 fix: fix stock_sy_hy_em interface
2889
+ 1.14.76 fix: fix stock_sy_em interface
2887
2890
  """
2888
2891
 
2889
- __version__ = "1.14.73"
2892
+ __version__ = "1.14.76"
2890
2893
  __author__ = "AKFamily"
2891
2894
 
2892
2895
  import sys
@@ -85,7 +85,7 @@ def stock_gpzy_profile_em() -> pd.DataFrame:
85
85
  return big_df
86
86
 
87
87
 
88
- def stock_gpzy_pledge_ratio_em(date: str = "20231020") -> pd.DataFrame:
88
+ def stock_gpzy_pledge_ratio_em(date: str = "20240906") -> pd.DataFrame:
89
89
  """
90
90
  东方财富网-数据中心-特色数据-股权质押-上市公司质押比例
91
91
  https://data.eastmoney.com/gpzy/pledgeRatio.aspx
@@ -470,13 +470,11 @@ def stock_gpzy_industry_data_em() -> pd.DataFrame:
470
470
  ]
471
471
  ]
472
472
  temp_df["统计时间"] = pd.to_datetime(temp_df["统计时间"]).dt.date
473
-
474
473
  temp_df["平均质押比例"] = pd.to_numeric(temp_df["平均质押比例"])
475
474
  temp_df["公司家数"] = pd.to_numeric(temp_df["公司家数"])
476
475
  temp_df["质押总笔数"] = pd.to_numeric(temp_df["质押总笔数"])
477
476
  temp_df["质押总股本"] = pd.to_numeric(temp_df["质押总股本"])
478
477
  temp_df["最新质押市值"] = pd.to_numeric(temp_df["最新质押市值"])
479
-
480
478
  return temp_df
481
479
 
482
480
 
@@ -484,7 +482,7 @@ if __name__ == "__main__":
484
482
  stock_gpzy_profile_em_df = stock_gpzy_profile_em()
485
483
  print(stock_gpzy_profile_em_df)
486
484
 
487
- stock_em_gpzy_pledge_ratio_df = stock_gpzy_pledge_ratio_em(date="20230303")
485
+ stock_em_gpzy_pledge_ratio_df = stock_gpzy_pledge_ratio_em(date="20240906")
488
486
  print(stock_em_gpzy_pledge_ratio_df)
489
487
 
490
488
  stock_gpzy_pledge_ratio_detail_em_df = stock_gpzy_pledge_ratio_detail_em()
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding:utf-8 -*-
3
3
  """
4
- Date: 2024/4/21 17:30
4
+ Date: 2024/9/15 15:30
5
5
  Desc: 东方财富网-数据中心-特色数据-商誉
6
6
  东方财富网-数据中心-特色数据-商誉-A股商誉市场概况: https://data.eastmoney.com/sy/scgk.html
7
7
  东方财富网-数据中心-特色数据-商誉-商誉减值预期明细: https://data.eastmoney.com/sy/yqlist.html
@@ -12,7 +12,8 @@ Desc: 东方财富网-数据中心-特色数据-商誉
12
12
 
13
13
  import pandas as pd
14
14
  import requests
15
- from tqdm import tqdm
15
+
16
+ from akshare.utils.tqdm import get_tqdm
16
17
 
17
18
 
18
19
  def stock_sy_profile_em() -> pd.DataFrame:
@@ -80,7 +81,7 @@ def stock_sy_profile_em() -> pd.DataFrame:
80
81
  return data_df
81
82
 
82
83
 
83
- def stock_sy_yq_em(date: str = "20221231") -> pd.DataFrame:
84
+ def stock_sy_yq_em(date: str = "20240630") -> pd.DataFrame:
84
85
  """
85
86
  东方财富网-数据中心-特色数据-商誉-商誉减值预期明细
86
87
  https://data.eastmoney.com/sy/yqlist.html
@@ -104,12 +105,13 @@ def stock_sy_yq_em(date: str = "20221231") -> pd.DataFrame:
104
105
  data_json = r.json()
105
106
  big_df = pd.DataFrame()
106
107
  total_page = int(data_json["result"]["pages"])
108
+ tqdm = get_tqdm()
107
109
  for page in tqdm(range(1, total_page + 1), leave=False):
108
110
  params.update({"pageNumber": page})
109
111
  r = requests.get(url, params=params)
110
112
  data_json = r.json()
111
113
  temp_df = pd.DataFrame(data_json["result"]["data"])
112
- big_df = pd.concat([big_df, temp_df], ignore_index=True)
114
+ big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True)
113
115
  big_df.reset_index(inplace=True)
114
116
  big_df["index"] = big_df["index"] + 1
115
117
  big_df.rename(
@@ -188,7 +190,7 @@ def stock_sy_yq_em(date: str = "20221231") -> pd.DataFrame:
188
190
  return big_df
189
191
 
190
192
 
191
- def stock_sy_jz_em(date: str = "20230331") -> pd.DataFrame:
193
+ def stock_sy_jz_em(date: str = "20240630") -> pd.DataFrame:
192
194
  """
193
195
  东方财富网-数据中心-特色数据-商誉-个股商誉减值明细
194
196
  https://data.eastmoney.com/sy/jzlist.html
@@ -212,12 +214,13 @@ def stock_sy_jz_em(date: str = "20230331") -> pd.DataFrame:
212
214
  data_json = r.json()
213
215
  big_df = pd.DataFrame()
214
216
  total_page = int(data_json["result"]["pages"])
217
+ tqdm = get_tqdm()
215
218
  for page in tqdm(range(1, total_page + 1), leave=False):
216
219
  params.update({"pageNumber": page})
217
220
  r = requests.get(url, params=params)
218
221
  data_json = r.json()
219
222
  temp_df = pd.DataFrame(data_json["result"]["data"])
220
- big_df = pd.concat([big_df, temp_df], ignore_index=True)
223
+ big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True)
221
224
  big_df.reset_index(inplace=True)
222
225
  big_df["index"] = big_df["index"] + 1
223
226
  big_df.rename(
@@ -312,12 +315,13 @@ def stock_sy_em(date: str = "20231231") -> pd.DataFrame:
312
315
  data_json = r.json()
313
316
  big_df = pd.DataFrame()
314
317
  total_page = int(data_json["result"]["pages"])
318
+ tqdm = get_tqdm()
315
319
  for page in tqdm(range(1, total_page + 1), leave=False):
316
320
  params.update({"pageNumber": page})
317
321
  r = requests.get(url, params=params)
318
322
  data_json = r.json()
319
323
  temp_df = pd.DataFrame(data_json["result"]["data"])
320
- big_df = pd.concat([big_df, temp_df], ignore_index=True)
324
+ big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True)
321
325
  big_df.reset_index(inplace=True)
322
326
  big_df["index"] = big_df["index"] + 1
323
327
  big_df.rename(
@@ -403,12 +407,13 @@ def stock_sy_hy_em(date: str = "20231231") -> pd.DataFrame:
403
407
  data_json = r.json()
404
408
  big_df = pd.DataFrame()
405
409
  total_page = int(data_json["result"]["pages"])
410
+ tqdm = get_tqdm()
406
411
  for page in tqdm(range(1, total_page + 1), leave=False):
407
412
  params.update({"pageNumber": page})
408
413
  r = requests.get(url, params=params)
409
414
  data_json = r.json()
410
415
  temp_df = pd.DataFrame(data_json["result"]["data"])
411
- big_df = pd.concat([big_df, temp_df], ignore_index=True)
416
+ big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True)
412
417
  big_df.reset_index(inplace=True, drop=True)
413
418
  big_df.rename(
414
419
  columns={
@@ -450,13 +455,13 @@ if __name__ == "__main__":
450
455
  stock_em_sy_profile_df = stock_sy_profile_em()
451
456
  print(stock_em_sy_profile_df)
452
457
 
453
- stock_sy_yq_em_df = stock_sy_yq_em(date="20221231")
458
+ stock_sy_yq_em_df = stock_sy_yq_em(date="20240630")
454
459
  print(stock_sy_yq_em_df)
455
460
 
456
- stock_sy_jz_em_df = stock_sy_jz_em(date="20230630")
461
+ stock_sy_jz_em_df = stock_sy_jz_em(date="20240630")
457
462
  print(stock_sy_jz_em_df)
458
463
 
459
- stock_sy_em_df = stock_sy_em(date="20231231")
464
+ stock_sy_em_df = stock_sy_em(date="20240630")
460
465
  print(stock_sy_em_df)
461
466
 
462
467
  stock_sy_hy_em_df = stock_sy_hy_em(date="20231231")
akshare/utils/demjson.py CHANGED
@@ -117,7 +117,7 @@ def determine_float_limits(number_type=float):
117
117
  else:
118
118
  numeric_exceptions = (ValueError,)
119
119
 
120
- if decimal and number_type == decimal.Decimal:
120
+ if decimal and number_type is decimal.Decimal:
121
121
  number_type = decimal.DefaultContext
122
122
 
123
123
  if decimal and isinstance(number_type, decimal.Context):
@@ -125,7 +125,7 @@ def determine_float_limits(number_type=float):
125
125
  create_num = number_type.create_decimal
126
126
  decimal_ctx = decimal.localcontext(number_type)
127
127
  is_zero_or_subnormal = lambda n: n.is_zero() or n.is_subnormal()
128
- elif number_type == float:
128
+ elif number_type is float:
129
129
  create_num = number_type
130
130
  decimal_ctx = _dummy_context_manager
131
131
  is_zero_or_subnormal = lambda n: n == 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: akshare
3
- Version: 1.14.73
3
+ Version: 1.14.76
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
@@ -1,4 +1,4 @@
1
- akshare/__init__.py,sha256=pwFI_BlEN0t15xyzObNbyNmZDhgGP_qUS7SR1RFyzVU,181465
1
+ akshare/__init__.py,sha256=zoowojgk1W7oaoxu5kQC-VYxuW-pUTtx7hGMlg6IhtA,181600
2
2
  akshare/datasets.py,sha256=-qdwaQjgBlftX84uM74KJqCYJYkQ50PV416_neA4uls,995
3
3
  akshare/air/__init__.py,sha256=RMTf1bT5EOE3ttWpn3hGu1LtUmsVxDoa0W7W0gXHOy8,81
4
4
  akshare/air/air_hebei.py,sha256=xIXNGLK7IGYqrkteM9fxnHAwWqk6PCQs6D9-ggZ7byY,4442
@@ -311,7 +311,7 @@ akshare/stock_feature/stock_gddh_em.py,sha256=I_MUJhyy0mwjNG46ZsQINEQvHR42EmS7gJ
311
311
  akshare/stock_feature/stock_gdfx_em.py,sha256=vrzyMdcNw8wZabXYH89wjzIAokAVfHDVcpNfC0MHsl4,37825
312
312
  akshare/stock_feature/stock_gdhs.py,sha256=Fkrcs1HEOFNEXdQL4fO2-bMDvKV-Shu-fGECk4h7it0,8801
313
313
  akshare/stock_feature/stock_gdzjc_em.py,sha256=SHJH5iS3_NhvjTqRXF0vPooZl0s_ASeyZmNCC50ZYqs,4426
314
- akshare/stock_feature/stock_gpzy_em.py,sha256=ubFynLHM6Kc1h5fr0_UpXpZdExEWlJbSn8QumwyxObw,17445
314
+ akshare/stock_feature/stock_gpzy_em.py,sha256=8NvLfWbLLQyjTlg6iSpg1LxlIAKLv534JZAiUAVxF1M,17443
315
315
  akshare/stock_feature/stock_gxl_lg.py,sha256=I8TpDEpFzadZSSyZisyIk6163mJlRxup91dmlBH4t4U,2641
316
316
  akshare/stock_feature/stock_hist_em.py,sha256=H8bbC0LJBvDTRnrhZvFtrMM8Y6H4LZk-C0KIPar1aQs,69201
317
317
  akshare/stock_feature/stock_hist_tx.py,sha256=WpLsbkG2didSx7lYNkSbTWNTrLhUKbcopfD18WO2Rlc,3397
@@ -336,7 +336,7 @@ akshare/stock_feature/stock_qsjy_em.py,sha256=7EHroLZC3-X_3WNhb7GV9MPQHbxjtkfKI_
336
336
  akshare/stock_feature/stock_report_em.py,sha256=L_4alI4Rl14deGioCvF5BB34yvfWCpdmlrIVtuNSxec,13648
337
337
  akshare/stock_feature/stock_research_report_em.py,sha256=XFQadpUI2l0-Ik8BQWf-eCC4uFC1xxt9VNiZ9NU2zp0,4888
338
338
  akshare/stock_feature/stock_sns_sseinfo.py,sha256=TGGLw5P77Hh-sSHgw_KKoK29d1m_V_2GDQXe9m_XFew,4556
339
- akshare/stock_feature/stock_sy_em.py,sha256=VCJO2V4PkGpaOJtzgGw74R4J2i-FMBr1ZR8sTrgYMdA,17594
339
+ akshare/stock_feature/stock_sy_em.py,sha256=GdqjWH8uVy_8st2sYENgzNlJRQxkTajDkaHBwX31pjc,17721
340
340
  akshare/stock_feature/stock_technology_ths.py,sha256=Cf-QYVJ2aweFIlQAgqAom6bYyfnoSsYqa95A6I7_XRQ,30579
341
341
  akshare/stock_feature/stock_tfp_em.py,sha256=nN4gcK6hOe4tIA-nOoY_lMNC7qY7o9Ga35_-VvxS3fA,2474
342
342
  akshare/stock_feature/stock_three_report_em.py,sha256=riIE9YwMKn279GAAdBFATTfK4_ui4X30Ew1LNcIwwsk,23675
@@ -374,14 +374,14 @@ akshare/tool/__init__.py,sha256=RMTf1bT5EOE3ttWpn3hGu1LtUmsVxDoa0W7W0gXHOy8,81
374
374
  akshare/tool/trade_date_hist.py,sha256=o9021QHdOEVucjynFl0jLEi1PEMlNxvDKnMsFSwRfqg,1431
375
375
  akshare/utils/__init__.py,sha256=HbKUP2vZApbeK2PTZVO_m-6kAUymfDwm2yv3Kr4R_1A,81
376
376
  akshare/utils/cons.py,sha256=PFZndkG3lMW1Qhg-wqcZmSowFXwQUsYYCLZT4s1Xkwc,225
377
- akshare/utils/demjson.py,sha256=wcVnJQFSorEyiURl8pAUC4qqwOva9KGVDi3hfenNhPY,241609
377
+ akshare/utils/demjson.py,sha256=xW2z0UGS2zzyH_dzhd765ZveuXRbfjkM7KBiI8H5fJA,241609
378
378
  akshare/utils/func.py,sha256=PDkwpyCjZCbCLSAG9wBQt-sYNtb1XlpUBvhAfuSLf3s,586
379
379
  akshare/utils/token_process.py,sha256=K4rGXjh_tgugbRcyOK2h2x0jP3PT65IIK7nxhUKhOeQ,666
380
380
  akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
381
381
  tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
382
382
  tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
383
- akshare-1.14.73.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
384
- akshare-1.14.73.dist-info/METADATA,sha256=FQnMZq6GYKBwQJbj_Wlnx-xzezI5j-bdOejLwmoVSb4,14112
385
- akshare-1.14.73.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
386
- akshare-1.14.73.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
387
- akshare-1.14.73.dist-info/RECORD,,
383
+ akshare-1.14.76.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
384
+ akshare-1.14.76.dist-info/METADATA,sha256=8Anst2ST7IjTxabbj0cP2P5xtbpvqiZTTyV6euTN454,14112
385
+ akshare-1.14.76.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
386
+ akshare-1.14.76.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
387
+ akshare-1.14.76.dist-info/RECORD,,