akshare 1.12.95__py3-none-any.whl → 1.15.72__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 +446 -139
- akshare/air/air_hebei.py +79 -53
- akshare/air/air_zhenqi.py +29 -43
- akshare/air/sunrise_tad.py +32 -17
- akshare/bank/bank_cbirc_2020.py +12 -9
- akshare/bond/bond_cb_ths.py +17 -9
- akshare/bond/bond_china.py +38 -39
- akshare/bond/bond_china_money.py +75 -48
- akshare/bond/bond_convert.py +40 -16
- akshare/bond/bond_info_cm.py +28 -8
- akshare/bond/bond_issue_cninfo.py +73 -30
- akshare/bond/{bond_zh_cov_sina.py → bond_zh_cov.py} +41 -17
- akshare/bond/bond_zh_sina.py +57 -51
- akshare/cal/__init__.py +0 -0
- akshare/cal/rv.py +170 -0
- akshare/cost/cost_living.py +7 -5
- akshare/currency/currency_safe.py +7 -6
- akshare/data/cninfo.js +15 -0
- akshare/datasets.py +10 -21
- akshare/economic/macro_bank.py +95 -653
- akshare/economic/macro_china.py +772 -1024
- akshare/economic/macro_china_hk.py +65 -243
- akshare/economic/macro_china_nbs.py +24 -7
- akshare/economic/macro_constitute.py +17 -12
- akshare/economic/macro_euro.py +13 -6
- akshare/economic/macro_finance_ths.py +133 -0
- akshare/economic/macro_info_ws.py +100 -0
- akshare/economic/macro_japan.py +5 -4
- akshare/economic/macro_other.py +12 -9
- akshare/economic/macro_usa.py +376 -1940
- akshare/economic/marco_cnbs.py +11 -6
- akshare/energy/energy_carbon.py +94 -125
- akshare/event/migration.py +3 -2
- akshare/exceptions.py +43 -0
- akshare/file_fold/calendar.json +245 -2
- akshare/fortune/fortune_500.py +15 -48
- akshare/fund/fund_amac.py +157 -75
- akshare/fund/fund_em.py +191 -184
- akshare/fund/fund_etf_em.py +20 -19
- akshare/fund/fund_etf_sina.py +71 -23
- akshare/fund/fund_etf_ths.py +93 -0
- akshare/fund/fund_fee_em.py +98 -0
- akshare/fund/fund_lof_em.py +10 -8
- akshare/fund/fund_portfolio_em.py +60 -50
- akshare/fund/fund_rank_em.py +91 -82
- akshare/fund/fund_report_cninfo.py +63 -48
- akshare/fund/fund_scale_sina.py +20 -10
- akshare/fund/fund_xq.py +139 -109
- akshare/futures/cons.py +8 -31
- akshare/futures/cot.py +185 -137
- akshare/futures/futures_basis.py +97 -32
- akshare/futures/futures_comm_ctp.py +37 -0
- akshare/futures/futures_comm_qihuo.py +74 -45
- akshare/futures/futures_daily_bar.py +121 -184
- akshare/futures/futures_hf_em.py +66 -61
- akshare/futures/futures_hq_sina.py +79 -61
- akshare/futures/futures_index_ccidx.py +6 -3
- akshare/futures/futures_inventory_99.py +61 -272
- akshare/futures/futures_news_shmet.py +4 -2
- akshare/futures/futures_roll_yield.py +12 -25
- akshare/futures/futures_spot_stock_em.py +19 -13
- akshare/futures/futures_stock_js.py +14 -12
- akshare/futures/futures_to_spot.py +38 -33
- akshare/futures/futures_warehouse_receipt.py +75 -71
- akshare/futures/futures_zh_sina.py +73 -50
- akshare/futures/symbol_var.py +18 -13
- akshare/futures_derivative/futures_contract_info_czce.py +60 -52
- akshare/futures_derivative/futures_contract_info_ine.py +43 -34
- akshare/futures_derivative/futures_contract_info_shfe.py +46 -35
- akshare/futures_derivative/futures_cot_sina.py +26 -19
- akshare/futures_derivative/futures_spot_sys.py +21 -8
- akshare/fx/currency_investing.py +19 -285
- akshare/index/index_cflp.py +29 -26
- akshare/index/index_cni.py +86 -88
- akshare/index/index_cons.py +26 -10
- akshare/index/index_cx.py +248 -47
- akshare/index/index_drewry.py +17 -16
- akshare/index/index_hog.py +27 -26
- akshare/index/index_option_qvix.py +329 -0
- akshare/index/index_research_fund_sw.py +134 -0
- akshare/index/{index_sw_research.py → index_research_sw.py} +122 -58
- akshare/index/index_spot.py +9 -5
- akshare/index/index_stock_hk.py +35 -16
- akshare/index/index_stock_us_sina.py +1 -1
- akshare/index/index_stock_zh.py +180 -89
- akshare/index/index_stock_zh_csindex.py +15 -369
- akshare/index/index_sw.py +62 -34
- akshare/index/index_yw.py +46 -23
- akshare/index/index_zh_a_scope.py +48 -0
- akshare/index/index_zh_em.py +17 -14
- akshare/interest_rate/interbank_rate_em.py +14 -9
- akshare/movie/artist_yien.py +32 -5
- akshare/movie/movie_yien.py +92 -18
- akshare/movie/video_yien.py +28 -5
- akshare/news/news_baidu.py +78 -44
- akshare/news/news_cctv.py +38 -38
- akshare/news/news_stock.py +6 -3
- akshare/nlp/nlp_interface.py +7 -8
- akshare/option/cons.py +11 -11
- akshare/option/option_comm_qihuo.py +86 -0
- akshare/option/option_commodity.py +178 -51
- akshare/option/option_daily_stats_sse_szse.py +146 -0
- akshare/option/option_em.py +147 -138
- akshare/option/option_finance_sina.py +160 -137
- akshare/option/option_lhb_em.py +62 -56
- akshare/option/option_risk_indicator_sse.py +17 -14
- akshare/other/other_car_cpca.py +934 -0
- akshare/other/{other_car.py → other_car_gasgoo.py} +15 -54
- akshare/qdii/__init__.py +0 -0
- akshare/qdii/qdii_jsl.py +233 -0
- akshare/request.py +117 -0
- akshare/spot/spot_hog_soozhu.py +232 -0
- akshare/spot/spot_price_qh.py +121 -0
- akshare/spot/spot_sge.py +63 -10
- akshare/stock/stock_allotment_cninfo.py +10 -9
- akshare/stock/stock_ask_bid_em.py +27 -3
- akshare/stock/stock_board_concept_em.py +23 -14
- akshare/stock/stock_board_industry_em.py +40 -34
- akshare/stock/stock_cg_equity_mortgage.py +15 -11
- akshare/stock/stock_cg_guarantee.py +41 -51
- akshare/stock/stock_cg_lawsuit.py +36 -35
- akshare/stock/stock_dividend_cninfo.py +12 -6
- akshare/stock/stock_dzjy_em.py +347 -260
- akshare/stock/stock_fund_em.py +332 -84
- akshare/stock/stock_hk_famous.py +108 -0
- akshare/stock/stock_hk_sina.py +8 -7
- akshare/stock/stock_hold_control_cninfo.py +100 -15
- akshare/stock/stock_hold_control_em.py +4 -3
- akshare/stock/stock_hold_num_cninfo.py +18 -12
- akshare/stock/stock_hot_rank_em.py +2 -1
- akshare/stock/stock_hot_search_baidu.py +5 -2
- akshare/stock/stock_industry_cninfo.py +24 -18
- akshare/stock/stock_industry_pe_cninfo.py +45 -31
- akshare/stock/stock_industry_sw.py +9 -10
- akshare/stock/stock_info.py +25 -15
- akshare/stock/stock_info_em.py +5 -2
- akshare/stock/stock_intraday_em.py +5 -2
- akshare/stock/stock_intraday_sina.py +22 -18
- akshare/stock/stock_ipo_summary_cninfo.py +25 -10
- akshare/stock/stock_new_cninfo.py +32 -19
- akshare/stock/stock_news_cx.py +39 -0
- akshare/stock/stock_profile_cninfo.py +9 -8
- akshare/stock/stock_rank_forecast.py +8 -6
- akshare/stock/stock_share_changes_cninfo.py +18 -14
- akshare/stock/stock_share_hold.py +24 -19
- akshare/stock/stock_summary.py +54 -26
- akshare/stock/stock_us_famous.py +15 -6
- akshare/stock/stock_us_pink.py +7 -5
- akshare/stock/stock_us_sina.py +15 -12
- akshare/stock/stock_xq.py +38 -12
- akshare/stock/stock_zh_a_sina.py +53 -78
- akshare/stock/stock_zh_b_sina.py +32 -55
- akshare/stock/stock_zh_kcb_report.py +11 -9
- akshare/stock/stock_zh_kcb_sina.py +67 -64
- akshare/stock_feature/stock_a_below_net_asset_statistics.py +5 -2
- akshare/stock_feature/stock_a_high_low.py +5 -2
- akshare/stock_feature/stock_a_indicator.py +12 -9
- akshare/stock_feature/stock_a_pe_and_pb.py +27 -6
- akshare/stock_feature/stock_account_em.py +58 -40
- akshare/stock_feature/stock_analyst_em.py +36 -27
- akshare/stock_feature/stock_board_industry_ths.py +136 -400
- akshare/stock_feature/stock_comment_em.py +118 -85
- akshare/stock_feature/stock_concept_futu.py +183 -0
- akshare/stock_feature/stock_cyq_em.py +58 -54
- akshare/stock_feature/stock_disclosure_cninfo.py +147 -102
- akshare/stock_feature/stock_esg_sina.py +216 -11
- akshare/stock_feature/stock_fhps_em.py +60 -25
- akshare/stock_feature/stock_fhps_ths.py +25 -6
- akshare/stock_feature/stock_fund_flow.py +38 -25
- akshare/stock_feature/stock_gdfx_em.py +180 -95
- akshare/stock_feature/stock_gdhs.py +73 -49
- akshare/stock_feature/stock_gpzy_em.py +78 -46
- akshare/stock_feature/stock_hist_em.py +164 -111
- akshare/stock_feature/stock_hk_valuation_baidu.py +20 -8
- akshare/stock_feature/stock_hsgt_em.py +184 -452
- akshare/stock_feature/stock_info.py +52 -29
- akshare/stock_feature/stock_inner_trade_xq.py +39 -31
- akshare/stock_feature/stock_irm_cninfo.py +32 -9
- akshare/stock_feature/stock_jgdy_em.py +41 -38
- akshare/stock_feature/stock_lh_yybpm.py +36 -37
- akshare/stock_feature/stock_lhb_em.py +135 -71
- akshare/stock_feature/stock_lhb_sina.py +93 -46
- akshare/stock_feature/stock_margin_em.py +102 -0
- akshare/stock_feature/{stock_sse_margin.py → stock_margin_sse.py} +21 -15
- akshare/stock_feature/{stock_szse_margin.py → stock_margin_szse.py} +23 -19
- akshare/stock_feature/stock_market_legu.py +13 -8
- akshare/stock_feature/stock_pankou_em.py +72 -34
- akshare/stock_feature/stock_report_em.py +244 -54
- akshare/stock_feature/stock_research_report_em.py +48 -19
- akshare/stock_feature/stock_sns_sseinfo.py +15 -12
- akshare/stock_feature/stock_sy_em.py +86 -33
- akshare/stock_feature/stock_technology_ths.py +152 -120
- akshare/stock_feature/stock_tfp_em.py +35 -13
- akshare/stock_feature/stock_three_report_em.py +119 -77
- akshare/stock_feature/stock_ttm_lyr.py +4 -7
- akshare/stock_feature/stock_value_em.py +83 -0
- akshare/stock_feature/stock_wencai.py +21 -9
- akshare/stock_feature/stock_yjyg_em.py +63 -28
- akshare/stock_feature/stock_zf_pg.py +61 -38
- akshare/stock_feature/stock_zh_valuation_baidu.py +3 -2
- akshare/stock_feature/stock_ztb_em.py +62 -40
- akshare/stock_fundamental/stock_finance.py +150 -58
- akshare/stock_fundamental/stock_finance_ths.py +116 -31
- akshare/stock_fundamental/stock_mda_ym.py +5 -3
- akshare/stock_fundamental/stock_notice.py +29 -15
- akshare/stock_fundamental/stock_profit_forecast_em.py +31 -13
- akshare/stock_fundamental/stock_profit_forecast_ths.py +19 -10
- akshare/stock_fundamental/stock_register_em.py +448 -0
- akshare/stock_fundamental/stock_restricted_em.py +79 -32
- akshare/stock_fundamental/stock_zygc.py +10 -8
- akshare/stock_fundamental/stock_zyjs_ths.py +5 -3
- akshare/tool/trade_date_hist.py +4 -3
- akshare/utils/cons.py +10 -0
- akshare/utils/context.py +43 -0
- akshare/utils/demjson.py +2 -2
- akshare/utils/func.py +26 -0
- akshare/utils/tqdm.py +13 -3
- {akshare-1.12.95.dist-info → akshare-1.15.72.dist-info}/METADATA +52 -69
- akshare-1.15.72.dist-info/RECORD +385 -0
- {akshare-1.12.95.dist-info → akshare-1.15.72.dist-info}/WHEEL +1 -1
- tests/test_func.py +3 -5
- akshare/bond/bond_futures.py +0 -50
- akshare/bond/bond_investing.py +0 -139
- akshare/crypto/crypto_hist_investing.py +0 -249
- akshare/fortune/fortune_it_juzi.py +0 -123
- akshare/futures/futures_international.py +0 -170
- akshare/futures/futures_news_baidu.py +0 -54
- akshare/futures/inventory_data.py +0 -100
- akshare/futures_derivative/futures_index_price_nh.py +0 -61
- akshare/futures_derivative/futures_index_return_nh.py +0 -47
- akshare/futures_derivative/futures_index_volatility_nh.py +0 -51
- akshare/futures_derivative/futures_other_index_nh.py +0 -145
- akshare/index/index_fear_greed_funddb.py +0 -71
- akshare/index/index_investing.py +0 -232
- akshare/sport/sport_olympic_winter.py +0 -39
- akshare/stock_feature/stock_board_concept_ths.py +0 -422
- akshare/stock_fundamental/stock_register.py +0 -292
- akshare-1.12.95.dist-info/RECORD +0 -374
- {akshare-1.12.95.dist-info → akshare-1.15.72.dist-info}/LICENSE +0 -0
- {akshare-1.12.95.dist-info → akshare-1.15.72.dist-info}/top_level.txt +0 -0
akshare/air/air_hebei.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date:
|
|
4
|
+
Date: 2024/4/25 17:20
|
|
5
5
|
Desc: 河北省空气质量预报信息发布系统
|
|
6
|
-
|
|
6
|
+
https://110.249.223.67/publish
|
|
7
7
|
每日 17 时发布
|
|
8
8
|
等级划分
|
|
9
9
|
1. 空气污染指数为0-50,空气质量级别为一级,空气质量状况属于优。此时,空气质量令人满意,基本无空气污染,各类人群可正常活动。
|
|
@@ -14,68 +14,94 @@ http://110.249.223.67/publish/
|
|
|
14
14
|
6. 空气污染指数大于300,空气质量级别为六级,空气质量状况属于严重污染。此时,健康人群运动耐受力降低,有明显强烈症状,提前出现某些疾病,建议儿童、老年人和病人应当留在室内,避免体力消耗,一般人群应避免户外活动。
|
|
15
15
|
发布单位:河北省环境应急与重污染天气预警中心 技术支持:中国科学院大气物理研究所 中科三清科技有限公司
|
|
16
16
|
"""
|
|
17
|
-
from datetime import datetime
|
|
18
17
|
|
|
19
18
|
import pandas as pd
|
|
20
19
|
import requests
|
|
21
|
-
from
|
|
20
|
+
from bs4 import BeautifulSoup
|
|
22
21
|
|
|
23
22
|
|
|
24
|
-
def air_quality_hebei(
|
|
23
|
+
def air_quality_hebei() -> pd.DataFrame:
|
|
25
24
|
"""
|
|
26
25
|
河北省空气质量预报信息发布系统-空气质量预报, 未来 6 天
|
|
27
|
-
http://
|
|
28
|
-
:param symbol: choice of {'石家庄市', '唐山市', '秦皇岛市', '邯郸市', '邢台市', '保定市', '张家口市', '承德市', '沧州市', '廊坊市', '衡水市', '辛集市', '定州市'}
|
|
29
|
-
:type symbol: str
|
|
26
|
+
http://218.11.10.130:8080/#/application/home
|
|
30
27
|
:return: city = "", 返回所有地区的数据; city="唐山市", 返回唐山市的数据
|
|
31
28
|
:rtype: pandas.DataFrame
|
|
32
29
|
"""
|
|
33
|
-
url = "http://
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
30
|
+
url = "http://218.11.10.130:8080/api/hour/130000.xml"
|
|
31
|
+
r = requests.get(url)
|
|
32
|
+
soup = BeautifulSoup(r.content, features="xml")
|
|
33
|
+
data = []
|
|
34
|
+
cities = soup.find_all("City")
|
|
35
|
+
for city in cities:
|
|
36
|
+
pointers = city.find_all("Pointer")
|
|
37
|
+
for pointer in pointers:
|
|
38
|
+
row = {
|
|
39
|
+
"City": city.Name.text if city.Name else None,
|
|
40
|
+
"Region": pointer.Region.text if pointer.Region else None,
|
|
41
|
+
"Station": pointer.Name.text if pointer.Name else None,
|
|
42
|
+
"DateTime": pointer.DataTime.text if pointer.DataTime else None,
|
|
43
|
+
"AQI": pointer.AQI.text if pointer.AQI else None,
|
|
44
|
+
"Level": pointer.Level.text if pointer.Level else None,
|
|
45
|
+
"MaxPoll": pointer.MaxPoll.text if pointer.MaxPoll else None,
|
|
46
|
+
"Longitude": pointer.CLng.text if pointer.CLng else None,
|
|
47
|
+
"Latitude": pointer.CLat.text if pointer.CLat else None,
|
|
48
|
+
}
|
|
49
|
+
polls = pointer.find_all("Poll")
|
|
50
|
+
for poll in polls:
|
|
51
|
+
poll_name = poll.Name.text if poll.Name else None
|
|
52
|
+
poll_value = poll.Value.text if poll.Value else None
|
|
53
|
+
row[f"{poll_name}_Value"] = poll_value
|
|
54
|
+
row[f"{poll_name}_IAQI"] = poll.IAQI.text if poll.IAQI else None
|
|
55
|
+
data.append(row)
|
|
56
|
+
|
|
57
|
+
df = pd.DataFrame(data)
|
|
58
|
+
numeric_columns = ["AQI", "Longitude", "Latitude"] + [
|
|
59
|
+
col for col in df.columns if col.endswith("_Value") or col.endswith("_IAQI")
|
|
60
|
+
]
|
|
61
|
+
for col in numeric_columns:
|
|
62
|
+
df[col] = pd.to_numeric(df[col], errors="coerce")
|
|
63
|
+
|
|
64
|
+
column_names = {
|
|
65
|
+
"City": "城市",
|
|
66
|
+
"Region": "区域",
|
|
67
|
+
"Station": "监测点",
|
|
68
|
+
"DateTime": "时间",
|
|
69
|
+
"Level": "空气质量等级",
|
|
70
|
+
"MaxPoll": "首要污染物",
|
|
71
|
+
"Longitude": "经度",
|
|
72
|
+
"Latitude": "纬度",
|
|
73
|
+
"SO2_Value": "二氧化硫_浓度",
|
|
74
|
+
"SO2_IAQI": "二氧化硫_IAQI",
|
|
75
|
+
"CO_Value": "一氧化碳_浓度",
|
|
76
|
+
"CO_IAQI": "一氧化碳_IAQI",
|
|
77
|
+
"NO2_Value": "二氧化氮_浓度",
|
|
78
|
+
"NO2_IAQI": "二氧化氮_IAQI",
|
|
79
|
+
"O3-1H_Value": "臭氧1小时_浓度",
|
|
80
|
+
"O3-1H_IAQI": "臭氧1小时_IAQI",
|
|
81
|
+
"O3-8H_Value": "臭氧8小时_浓度",
|
|
82
|
+
"O3-8H_IAQI": "臭氧8小时_IAQI",
|
|
83
|
+
"PM2.5_Value": "PM2.5_浓度",
|
|
84
|
+
"PM2.5_IAQI": "PM2.5_IAQI",
|
|
85
|
+
"PM10_Value": "PM10_浓度",
|
|
86
|
+
"PM10_IAQI": "PM10_IAQI",
|
|
87
|
+
}
|
|
88
|
+
df = df.rename(columns=column_names)
|
|
89
|
+
basic_columns = [
|
|
90
|
+
"城市",
|
|
91
|
+
"区域",
|
|
92
|
+
"监测点",
|
|
93
|
+
"时间",
|
|
94
|
+
"AQI",
|
|
95
|
+
"空气质量等级",
|
|
96
|
+
"首要污染物",
|
|
97
|
+
"经度",
|
|
98
|
+
"纬度",
|
|
99
|
+
]
|
|
100
|
+
pollutant_columns = [col for col in df.columns if col not in basic_columns]
|
|
101
|
+
df = df[basic_columns + sorted(pollutant_columns)]
|
|
102
|
+
return df
|
|
77
103
|
|
|
78
104
|
|
|
79
105
|
if __name__ == "__main__":
|
|
80
|
-
air_quality_hebei_df = air_quality_hebei(
|
|
106
|
+
air_quality_hebei_df = air_quality_hebei()
|
|
81
107
|
print(air_quality_hebei_df)
|
akshare/air/air_zhenqi.py
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date:
|
|
4
|
+
Date: 2024/4/2 22:40
|
|
5
5
|
Desc: 真气网-空气质量
|
|
6
6
|
https://www.zq12369.com/environment.php
|
|
7
7
|
空气质量在线监测分析平台的空气质量数据
|
|
8
8
|
https://www.aqistudy.cn/
|
|
9
9
|
"""
|
|
10
|
+
|
|
10
11
|
import json
|
|
11
12
|
import os
|
|
12
13
|
import re
|
|
@@ -14,7 +15,7 @@ from io import StringIO
|
|
|
14
15
|
|
|
15
16
|
import pandas as pd
|
|
16
17
|
import requests
|
|
17
|
-
from py_mini_racer import
|
|
18
|
+
from py_mini_racer import MiniRacer
|
|
18
19
|
|
|
19
20
|
from akshare.utils import demjson
|
|
20
21
|
|
|
@@ -29,9 +30,7 @@ def _get_js_path(name: str = None, module_file: str = None) -> str:
|
|
|
29
30
|
:return: 路径
|
|
30
31
|
:rtype: str
|
|
31
32
|
"""
|
|
32
|
-
module_folder = os.path.abspath(
|
|
33
|
-
os.path.dirname(os.path.dirname(module_file))
|
|
34
|
-
)
|
|
33
|
+
module_folder = os.path.abspath(os.path.dirname(os.path.dirname(module_file)))
|
|
35
34
|
module_json_path = os.path.join(module_folder, "air", name)
|
|
36
35
|
return module_json_path
|
|
37
36
|
|
|
@@ -71,6 +70,7 @@ def air_city_table() -> pd.DataFrame:
|
|
|
71
70
|
"""
|
|
72
71
|
url = "https://www.zq12369.com/environment.php"
|
|
73
72
|
date = "2020-05-01"
|
|
73
|
+
temp_df = None
|
|
74
74
|
if len(date.split("-")) == 3:
|
|
75
75
|
params = {
|
|
76
76
|
"date": date,
|
|
@@ -83,13 +83,21 @@ def air_city_table() -> pd.DataFrame:
|
|
|
83
83
|
del temp_df["降序"]
|
|
84
84
|
temp_df.reset_index(inplace=True)
|
|
85
85
|
temp_df["index"] = temp_df.index + 1
|
|
86
|
-
temp_df.columns = [
|
|
86
|
+
temp_df.columns = [
|
|
87
|
+
"序号",
|
|
88
|
+
"省份",
|
|
89
|
+
"城市",
|
|
90
|
+
"AQI",
|
|
91
|
+
"空气质量",
|
|
92
|
+
"PM2.5浓度",
|
|
93
|
+
"首要污染物",
|
|
94
|
+
]
|
|
87
95
|
temp_df["AQI"] = pd.to_numeric(temp_df["AQI"])
|
|
88
96
|
return temp_df
|
|
89
97
|
|
|
90
98
|
|
|
91
99
|
def air_quality_watch_point(
|
|
92
|
-
|
|
100
|
+
city: str = "杭州", start_date: str = "20220408", end_date: str = "20220409"
|
|
93
101
|
) -> pd.DataFrame:
|
|
94
102
|
"""
|
|
95
103
|
真气网-监测点空气质量-细化到具体城市的每个监测点
|
|
@@ -108,7 +116,7 @@ def air_quality_watch_point(
|
|
|
108
116
|
end_date = "-".join([end_date[:4], end_date[4:6], end_date[6:]])
|
|
109
117
|
url = "https://www.zq12369.com/api/zhenqiapi.php"
|
|
110
118
|
file_data = _get_file_content(file_name="crypto.js")
|
|
111
|
-
ctx =
|
|
119
|
+
ctx = MiniRacer()
|
|
112
120
|
ctx.eval(file_data)
|
|
113
121
|
method = "GETCITYPOINTAVG"
|
|
114
122
|
ctx.call("encode_param", method)
|
|
@@ -122,12 +130,11 @@ def air_quality_watch_point(
|
|
|
122
130
|
"city": city_param,
|
|
123
131
|
"startTime": ctx.call("encode_param", start_date),
|
|
124
132
|
"endTime": ctx.call("encode_param", end_date),
|
|
125
|
-
"secret": ctx.call(
|
|
126
|
-
"encode_secret", method, city_param, start_date, end_date
|
|
127
|
-
),
|
|
133
|
+
"secret": ctx.call("encode_secret", method, city_param, start_date, end_date),
|
|
128
134
|
}
|
|
129
135
|
headers = {
|
|
130
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
|
|
136
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
|
137
|
+
"Chrome/81.0.4044.122 Safari/537.36"
|
|
131
138
|
}
|
|
132
139
|
r = requests.post(url, data=payload, headers=headers)
|
|
133
140
|
data_text = r.text
|
|
@@ -137,10 +144,10 @@ def air_quality_watch_point(
|
|
|
137
144
|
|
|
138
145
|
|
|
139
146
|
def air_quality_hist(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
147
|
+
city: str = "杭州",
|
|
148
|
+
period: str = "day",
|
|
149
|
+
start_date: str = "20190327",
|
|
150
|
+
end_date: str = "20200427",
|
|
144
151
|
) -> pd.DataFrame:
|
|
145
152
|
"""
|
|
146
153
|
真气网-空气历史数据
|
|
@@ -160,9 +167,9 @@ def air_quality_hist(
|
|
|
160
167
|
end_date = "-".join([end_date[:4], end_date[4:6], end_date[6:]])
|
|
161
168
|
url = "https://www.zq12369.com/api/newzhenqiapi.php"
|
|
162
169
|
file_data = _get_file_content(file_name="outcrypto.js")
|
|
163
|
-
ctx =
|
|
170
|
+
ctx = MiniRacer()
|
|
164
171
|
ctx.eval(file_data)
|
|
165
|
-
|
|
172
|
+
app_id = "4f0e3a273d547ce6b7147bfa7ceb4b6e"
|
|
166
173
|
method = "CETCITYPERIOD"
|
|
167
174
|
timestamp = ctx.eval("timestamp = new Date().getTime()")
|
|
168
175
|
p_text = json.dumps(
|
|
@@ -175,9 +182,7 @@ def air_quality_hist(
|
|
|
175
182
|
ensure_ascii=False,
|
|
176
183
|
indent=None,
|
|
177
184
|
).replace(' "', '"')
|
|
178
|
-
secret = ctx.call(
|
|
179
|
-
"hex_md5", appId + method + str(timestamp) + "WEB" + p_text
|
|
180
|
-
)
|
|
185
|
+
secret = ctx.call("hex_md5", app_id + method + str(timestamp) + "WEB" + p_text)
|
|
181
186
|
payload = {
|
|
182
187
|
"appId": "4f0e3a273d547ce6b7147bfa7ceb4b6e",
|
|
183
188
|
"method": "CETCITYPERIOD",
|
|
@@ -200,30 +205,11 @@ def air_quality_hist(
|
|
|
200
205
|
)
|
|
201
206
|
|
|
202
207
|
headers = {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
# 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8',
|
|
206
|
-
# 'Cache-Control': 'no-cache',
|
|
207
|
-
# 'Connection': 'keep-alive',
|
|
208
|
-
# 'Content-Length': '1174',
|
|
209
|
-
# 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
|
210
|
-
# 'Cookie': 'UM_distinctid=1800e5142c5b85-04b8f11aa852f3-1a343370-1fa400-1800e5142c6b7e; CNZZDATA1254317176=1502593570-1649496979-%7C1649507817; city=%E6%9D%AD%E5%B7%9E; SECKEY_ABVK=eSrbUhd28Mjo7jf8Rfh+uY5E9C+tAhQ8mOfYJHSjSfY%3D; BMAP_SECKEY=N5fGcwdWpeJW46eZRpR9GW3qdVnODGQwGm6JE0ELECQHJOTFc9MCuNdyf8OWUspFI6Xq4MMPxgVVr5I13odFOW6AQMgSPOtEvVHciC2NsQwb1pnmFtEaqyKHOUeavelt0ejBy6ETRD_4FXAhZb9FSbVIMPew7qwFX_kdPDxVJH-vHfCVhRx9XDZgb41B_T4D',
|
|
211
|
-
# 'Host': 'www.zq12369.com',
|
|
212
|
-
# 'Origin': 'https://www.zq12369.com',
|
|
213
|
-
# 'Pragma': 'no-cache',
|
|
214
|
-
# 'Referer': 'https://www.zq12369.com/environment.php?catid=4',
|
|
215
|
-
# 'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100"',
|
|
216
|
-
# 'sec-ch-ua-mobile': '?0',
|
|
217
|
-
# 'sec-ch-ua-platform': '"Windows"',
|
|
218
|
-
# 'Sec-Fetch-Dest': 'empty',
|
|
219
|
-
# 'Sec-Fetch-Mode': 'cors',
|
|
220
|
-
# 'Sec-Fetch-Site': 'same-origin',
|
|
221
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36",
|
|
208
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)"
|
|
209
|
+
"Chrome/100.0.4896.75 Safari/537.36",
|
|
222
210
|
"X-Requested-With": "XMLHttpRequest",
|
|
223
211
|
}
|
|
224
|
-
params = {"param": ctx.call("AES.encrypt", need)}
|
|
225
212
|
params = {"param": ctx.call("encode_param", need)}
|
|
226
|
-
|
|
227
213
|
r = requests.post(url, data=params, headers=headers)
|
|
228
214
|
temp_text = ctx.call("decryptData", r.text)
|
|
229
215
|
data_json = demjson.decode(ctx.call("b.decode", temp_text))
|
|
@@ -304,7 +290,7 @@ if __name__ == "__main__":
|
|
|
304
290
|
city="北京",
|
|
305
291
|
period="day",
|
|
306
292
|
start_date="20220801",
|
|
307
|
-
end_date="
|
|
293
|
+
end_date="20240402",
|
|
308
294
|
)
|
|
309
295
|
print(air_quality_hist_df)
|
|
310
296
|
|
akshare/air/sunrise_tad.py
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date: 2024/
|
|
4
|
+
Date: 2024/4/29 16:00
|
|
5
5
|
Desc: 日出和日落数据
|
|
6
6
|
https://www.timeanddate.com
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
from io import StringIO
|
|
9
10
|
|
|
10
11
|
import pandas as pd
|
|
11
|
-
import pypinyin
|
|
12
12
|
import requests
|
|
13
13
|
|
|
14
14
|
|
|
@@ -31,11 +31,13 @@ def sunrise_city_list() -> list:
|
|
|
31
31
|
city_list.extend([item.lower() for item in china_city_two_df.iloc[:, 1].tolist()])
|
|
32
32
|
city_list.extend([item.lower() for item in china_city_two_df.iloc[:, 2].tolist()])
|
|
33
33
|
city_list.extend([item.lower() for item in china_city_two_df.iloc[:, 3].tolist()])
|
|
34
|
-
city_list.extend(
|
|
34
|
+
city_list.extend(
|
|
35
|
+
[item.lower() for item in china_city_two_df.iloc[:, 4].dropna().tolist()]
|
|
36
|
+
)
|
|
35
37
|
return city_list
|
|
36
38
|
|
|
37
39
|
|
|
38
|
-
def sunrise_daily(date: str = "
|
|
40
|
+
def sunrise_daily(date: str = "20240428", city: str = "beijing") -> pd.DataFrame:
|
|
39
41
|
"""
|
|
40
42
|
每日日出日落数据
|
|
41
43
|
https://www.timeanddate.com/astronomy/china/shaoxing
|
|
@@ -46,24 +48,29 @@ def sunrise_daily(date: str = "20200428", city: str = "北京") -> pd.DataFrame:
|
|
|
46
48
|
:return: 返回指定日期指定地区的日出日落数据
|
|
47
49
|
:rtype: pandas.DataFrame
|
|
48
50
|
"""
|
|
49
|
-
|
|
51
|
+
import urllib3
|
|
52
|
+
|
|
53
|
+
urllib3.disable_warnings()
|
|
54
|
+
if city in sunrise_city_list():
|
|
50
55
|
year = date[:4]
|
|
51
56
|
month = date[4:6]
|
|
52
|
-
url = f"https://www.timeanddate.com/sun/china/{
|
|
53
|
-
r = requests.get(url)
|
|
57
|
+
url = f"https://www.timeanddate.com/sun/china/{city}?month={month}&year={year}"
|
|
58
|
+
r = requests.get(url, verify=False)
|
|
54
59
|
table = pd.read_html(StringIO(r.text), header=2)[1]
|
|
55
|
-
month_df = table.iloc[:-1,
|
|
56
|
-
day_df = month_df[
|
|
60
|
+
month_df = table.iloc[:-1,]
|
|
61
|
+
day_df = month_df[
|
|
62
|
+
month_df.iloc[:, 0].astype(str).str.zfill(2) == date[6:]
|
|
63
|
+
].copy()
|
|
57
64
|
day_df.index = pd.to_datetime([date] * len(day_df), format="%Y%m%d")
|
|
58
65
|
day_df.reset_index(inplace=True)
|
|
59
66
|
day_df.rename(columns={"index": "date"}, inplace=True)
|
|
60
|
-
day_df[
|
|
67
|
+
day_df["date"] = pd.to_datetime(day_df["date"]).dt.date
|
|
61
68
|
return day_df
|
|
62
69
|
else:
|
|
63
70
|
raise "请输入正确的城市名称"
|
|
64
71
|
|
|
65
72
|
|
|
66
|
-
def sunrise_monthly(date: str = "
|
|
73
|
+
def sunrise_monthly(date: str = "20240428", city: str = "beijing") -> pd.DataFrame:
|
|
67
74
|
"""
|
|
68
75
|
每个指定 date 所在月份的每日日出日落数据, 如果当前月份未到月底, 则以预测值填充
|
|
69
76
|
https://www.timeanddate.com/astronomy/china/shaoxing
|
|
@@ -74,24 +81,32 @@ def sunrise_monthly(date: str = "20190801", city: str = "北京") -> pd.DataFram
|
|
|
74
81
|
:return: 指定 date 所在月份的每日日出日落数据
|
|
75
82
|
:rtype: pandas.DataFrame
|
|
76
83
|
"""
|
|
77
|
-
|
|
84
|
+
import urllib3
|
|
85
|
+
|
|
86
|
+
urllib3.disable_warnings()
|
|
87
|
+
if city in sunrise_city_list():
|
|
78
88
|
year = date[:4]
|
|
79
89
|
month = date[4:6]
|
|
80
|
-
url = f"https://www.timeanddate.com/sun/china/{
|
|
90
|
+
url = f"https://www.timeanddate.com/sun/china/{city}?month={month}&year={year}"
|
|
81
91
|
r = requests.get(url)
|
|
82
92
|
table = pd.read_html(StringIO(r.text), header=2)[1]
|
|
83
|
-
month_df = table.iloc[:-1,
|
|
93
|
+
month_df = table.iloc[:-1,].copy()
|
|
84
94
|
month_df.index = [date[:-2]] * len(month_df)
|
|
85
95
|
month_df.reset_index(inplace=True)
|
|
86
|
-
month_df.rename(
|
|
96
|
+
month_df.rename(
|
|
97
|
+
columns={
|
|
98
|
+
"index": "date",
|
|
99
|
+
},
|
|
100
|
+
inplace=True,
|
|
101
|
+
)
|
|
87
102
|
return month_df
|
|
88
103
|
else:
|
|
89
104
|
raise "请输入正确的城市名称"
|
|
90
105
|
|
|
91
106
|
|
|
92
107
|
if __name__ == "__main__":
|
|
93
|
-
sunrise_daily_df = sunrise_daily(date="
|
|
108
|
+
sunrise_daily_df = sunrise_daily(date="20240428", city="beijing")
|
|
94
109
|
print(sunrise_daily_df)
|
|
95
110
|
|
|
96
|
-
sunrise_monthly_df = sunrise_monthly(date="
|
|
111
|
+
sunrise_monthly_df = sunrise_monthly(date="20240428", city="beijing")
|
|
97
112
|
print(sunrise_monthly_df)
|
akshare/bank/bank_cbirc_2020.py
CHANGED
|
@@ -8,6 +8,7 @@ https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=4115&ite
|
|
|
8
8
|
https://www.cbirc.gov.cn/cn/static/data/DocInfo/SelectByDocId/data_docId=881446.json
|
|
9
9
|
2020 新接口
|
|
10
10
|
"""
|
|
11
|
+
|
|
11
12
|
import warnings
|
|
12
13
|
from io import StringIO
|
|
13
14
|
|
|
@@ -33,7 +34,7 @@ def bank_fjcf_total_num(item: str = "分局本级") -> int:
|
|
|
33
34
|
"分局本级": "4115",
|
|
34
35
|
}
|
|
35
36
|
cbirc_headers = cbirc_headers_without_cookie_2020.copy()
|
|
36
|
-
main_url = "
|
|
37
|
+
main_url = "https://www.cbirc.gov.cn/cbircweb/DocInfo/SelectDocByItemIdAndChild"
|
|
37
38
|
params = {
|
|
38
39
|
"itemId": item_id_list[item],
|
|
39
40
|
"pageSize": "18",
|
|
@@ -60,7 +61,7 @@ def bank_fjcf_total_page(item: str = "分局本级", begin: int = 1) -> int:
|
|
|
60
61
|
"分局本级": "4115",
|
|
61
62
|
}
|
|
62
63
|
cbirc_headers = cbirc_headers_without_cookie_2020.copy()
|
|
63
|
-
main_url = "
|
|
64
|
+
main_url = "https://www.cbirc.gov.cn/cbircweb/DocInfo/SelectDocByItemIdAndChild"
|
|
64
65
|
params = {
|
|
65
66
|
"itemId": item_id_list[item],
|
|
66
67
|
"pageSize": "18",
|
|
@@ -73,7 +74,7 @@ def bank_fjcf_total_page(item: str = "分局本级", begin: int = 1) -> int:
|
|
|
73
74
|
|
|
74
75
|
|
|
75
76
|
def bank_fjcf_page_url(
|
|
76
|
-
|
|
77
|
+
page: int = 5, item: str = "分局本级", begin: int = 1
|
|
77
78
|
) -> pd.DataFrame:
|
|
78
79
|
"""
|
|
79
80
|
获取 首页-政务信息-行政处罚-银保监分局本级-每一页的 json 数据
|
|
@@ -92,7 +93,7 @@ def bank_fjcf_page_url(
|
|
|
92
93
|
"分局本级": "4115",
|
|
93
94
|
}
|
|
94
95
|
cbirc_headers = cbirc_headers_without_cookie_2020.copy()
|
|
95
|
-
main_url = "
|
|
96
|
+
main_url = "https://www.cbirc.gov.cn/cbircweb/DocInfo/SelectDocByItemIdAndChild"
|
|
96
97
|
temp_df = pd.DataFrame()
|
|
97
98
|
for i_page in tqdm(range(begin, page + begin), leave=False):
|
|
98
99
|
params = {
|
|
@@ -108,7 +109,7 @@ def bank_fjcf_page_url(
|
|
|
108
109
|
|
|
109
110
|
|
|
110
111
|
def bank_fjcf_table_detail(
|
|
111
|
-
|
|
112
|
+
page: int = 5, item: str = "分局本级", begin: int = 1
|
|
112
113
|
) -> pd.DataFrame:
|
|
113
114
|
"""
|
|
114
115
|
获取 首页-政务信息-行政处罚-银保监分局本级-XXXX行政处罚信息公开表 数据
|
|
@@ -124,7 +125,7 @@ def bank_fjcf_table_detail(
|
|
|
124
125
|
id_list = bank_fjcf_page_url(page=page, item=item, begin=begin)["docId"]
|
|
125
126
|
big_df = pd.DataFrame()
|
|
126
127
|
for item in id_list:
|
|
127
|
-
url = f"
|
|
128
|
+
url = f"https://www.cbirc.gov.cn/cn/static/data/DocInfo/SelectByDocId/data_docId={item}.json"
|
|
128
129
|
res = requests.get(url)
|
|
129
130
|
try:
|
|
130
131
|
table_list = pd.read_html(StringIO(res.json()["data"]["docClob"]))[0]
|
|
@@ -146,7 +147,9 @@ def bank_fjcf_table_detail(
|
|
|
146
147
|
table_list = table_list[2:]
|
|
147
148
|
table_list.insert(2, pd.NA)
|
|
148
149
|
else:
|
|
149
|
-
print(
|
|
150
|
+
print(
|
|
151
|
+
f"{item} 异常,请通过 https://www.cbirc.gov.cn/cn/view/pages/ItemDetail.html?docId={item} 查看"
|
|
152
|
+
)
|
|
150
153
|
continue
|
|
151
154
|
|
|
152
155
|
# 部分会变成嵌套列表, 这里还原
|
|
@@ -159,7 +162,7 @@ def bank_fjcf_table_detail(
|
|
|
159
162
|
table_df.columns = ["内容"]
|
|
160
163
|
big_df = pd.concat(objs=[big_df, table_df.T], ignore_index=True)
|
|
161
164
|
# 解决有些页面缺少字段的问题, 都放到 try 里面
|
|
162
|
-
except:
|
|
165
|
+
except: # noqa: E722
|
|
163
166
|
warnings.warn(f"{item} 不是表格型数据,将跳过采集")
|
|
164
167
|
continue
|
|
165
168
|
if big_df.empty:
|
|
@@ -182,5 +185,5 @@ def bank_fjcf_table_detail(
|
|
|
182
185
|
|
|
183
186
|
|
|
184
187
|
if __name__ == "__main__":
|
|
185
|
-
bank_fjcf_table_detail_df = bank_fjcf_table_detail(page=1, item="机关", begin=
|
|
188
|
+
bank_fjcf_table_detail_df = bank_fjcf_table_detail(page=1, item="机关", begin=1)
|
|
186
189
|
print(bank_fjcf_table_detail_df)
|
akshare/bond/bond_cb_ths.py
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
# -*- coding:utf-8 -*-
|
|
2
2
|
# !/usr/bin/env python
|
|
3
3
|
"""
|
|
4
|
-
Date:
|
|
4
|
+
Date: 2024/8/14 11:30
|
|
5
5
|
Desc: 同花顺-数据中心-可转债
|
|
6
|
-
|
|
6
|
+
https://data.10jqka.com.cn/ipo/bond/
|
|
7
7
|
"""
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
import pandas as pd
|
|
10
|
+
import requests
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
def bond_zh_cov_info_ths() -> pd.DataFrame:
|
|
13
14
|
"""
|
|
14
15
|
同花顺-数据中心-可转债
|
|
15
|
-
|
|
16
|
+
https://data.10jqka.com.cn/ipo/bond/
|
|
16
17
|
:return: 可转债行情
|
|
17
18
|
:rtype: pandas.DataFrame
|
|
18
19
|
"""
|
|
19
|
-
url = "
|
|
20
|
+
url = "https://data.10jqka.com.cn/ipo/kzz/"
|
|
20
21
|
headers = {
|
|
21
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
|
|
22
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
|
23
|
+
"Chrome/89.0.4389.90 Safari/537.36",
|
|
22
24
|
}
|
|
23
25
|
r = requests.get(url, headers=headers)
|
|
24
26
|
data_json = r.json()
|
|
@@ -67,12 +69,18 @@ def bond_zh_cov_info_ths() -> pd.DataFrame:
|
|
|
67
69
|
"中签率",
|
|
68
70
|
]
|
|
69
71
|
]
|
|
70
|
-
temp_df["申购日期"] = pd.to_datetime(
|
|
71
|
-
|
|
72
|
+
temp_df["申购日期"] = pd.to_datetime(
|
|
73
|
+
temp_df["申购日期"], format="%Y-%m-%d", errors="coerce"
|
|
74
|
+
).dt.date
|
|
75
|
+
temp_df["中签公布日"] = pd.to_datetime(
|
|
76
|
+
temp_df["中签公布日"], format="%Y-%m-%d", errors="coerce"
|
|
77
|
+
).dt.date
|
|
72
78
|
temp_df["上市日期"] = pd.to_datetime(
|
|
73
79
|
temp_df["上市日期"], format="%Y-%m-%d", errors="coerce"
|
|
74
80
|
).dt.date
|
|
75
|
-
temp_df["到期时间"] = pd.to_datetime(
|
|
81
|
+
temp_df["到期时间"] = pd.to_datetime(
|
|
82
|
+
temp_df["到期时间"], format="%Y-%m-%d", errors="coerce"
|
|
83
|
+
).dt.date
|
|
76
84
|
temp_df["每股获配额"] = pd.to_numeric(temp_df["每股获配额"], errors="coerce")
|
|
77
85
|
temp_df["计划发行量"] = pd.to_numeric(temp_df["计划发行量"], errors="coerce")
|
|
78
86
|
temp_df["实际发行量"] = pd.to_numeric(temp_df["实际发行量"], errors="coerce")
|