tushare 1.4.19__py3-none-any.whl → 1.4.20__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.
- tushare/__init__.py +1 -1
- tushare/stock/rtq.py +10 -10
- tushare/util/format_stock_code.py +2 -5
- {tushare-1.4.19.dist-info → tushare-1.4.20.dist-info}/METADATA +5 -1
- {tushare-1.4.19.dist-info → tushare-1.4.20.dist-info}/RECORD +8 -8
- {tushare-1.4.19.dist-info → tushare-1.4.20.dist-info}/LICENSE +0 -0
- {tushare-1.4.19.dist-info → tushare-1.4.20.dist-info}/WHEEL +0 -0
- {tushare-1.4.19.dist-info → tushare-1.4.20.dist-info}/top_level.txt +0 -0
tushare/__init__.py
CHANGED
tushare/stock/rtq.py
CHANGED
@@ -182,7 +182,7 @@ def realtime_list(src: Optional[str] = None, interval: Optional[int] = 3,
|
|
182
182
|
10、最高:HIGH
|
183
183
|
11、最低:LOW
|
184
184
|
12、今开:OPEN
|
185
|
-
13、昨收:
|
185
|
+
13、昨收:PRICE
|
186
186
|
14、量比:VOL_RATIO
|
187
187
|
15、换手率:TURNOVER_RATE
|
188
188
|
16、市盈率-动态:PE
|
@@ -201,7 +201,7 @@ def realtime_list(src: Optional[str] = None, interval: Optional[int] = 3,
|
|
201
201
|
5、涨跌幅:PCT_CHANGE
|
202
202
|
6、买入:BUY
|
203
203
|
7、卖出:SALE
|
204
|
-
8、昨收:
|
204
|
+
8、昨收:CLOSE
|
205
205
|
9、今开:OPEN
|
206
206
|
10、最高:HIGH
|
207
207
|
11、最低:LOW
|
@@ -362,7 +362,7 @@ def get_stock_all_a_dc(page_count: Optional[int] = None,
|
|
362
362
|
# "RANK",
|
363
363
|
"TS_CODE",
|
364
364
|
"NAME",
|
365
|
-
"
|
365
|
+
"PRICE",
|
366
366
|
"PCT_CHANGE",
|
367
367
|
"CHANGE",
|
368
368
|
"VOLUME",
|
@@ -371,7 +371,7 @@ def get_stock_all_a_dc(page_count: Optional[int] = None,
|
|
371
371
|
"HIGH",
|
372
372
|
"LOW",
|
373
373
|
"OPEN",
|
374
|
-
"
|
374
|
+
"CLOSE",
|
375
375
|
"VOL_RATIO",
|
376
376
|
"TURNOVER_RATE",
|
377
377
|
"PE",
|
@@ -384,8 +384,8 @@ def get_stock_all_a_dc(page_count: Optional[int] = None,
|
|
384
384
|
"1YEAR",
|
385
385
|
]
|
386
386
|
# 指定要转换为 float 类型的列
|
387
|
-
cols_to_convert = ['
|
388
|
-
'HIGH', "LOW", "OPEN", "
|
387
|
+
cols_to_convert = ['PRICE', 'PCT_CHANGE', 'CHANGE', "VOLUME", "AMOUNT", "SWING",
|
388
|
+
'HIGH', "LOW", "OPEN", "CLOSE", "VOL_RATIO", "TURNOVER_RATE", "PE", "PB", "TOTAL_MV", "FLOAT_MV",
|
389
389
|
"RISE", "5MIN", "60DAY", "1YEAR"
|
390
390
|
]
|
391
391
|
# 使用 to_numeric() 方法将指定的列转换为 float 类型,并将非数值类型的数据转换为 NaN
|
@@ -429,12 +429,12 @@ def get_stock_all_a_sina(interval: Optional[int] = 3, page_count: Optional[int]
|
|
429
429
|
:rtype: pandas.DataFrame
|
430
430
|
1、代码:TS_CODE
|
431
431
|
2、名称:NAME
|
432
|
-
3、最新价:
|
432
|
+
3、最新价:PRICE
|
433
433
|
4、涨跌额:CHANGE
|
434
434
|
5、涨跌幅:PCT_CHANGE
|
435
435
|
6、买入:BUY
|
436
436
|
7、卖出:SALE
|
437
|
-
8、昨收:
|
437
|
+
8、昨收:CLOSE
|
438
438
|
9、今开:OPEN
|
439
439
|
10、最高:HIGH
|
440
440
|
11、最低:LOW
|
@@ -528,12 +528,12 @@ def get_stock_all_a_sina(interval: Optional[int] = 3, page_count: Optional[int]
|
|
528
528
|
big_df.columns = [
|
529
529
|
"TS_CODE",
|
530
530
|
"NAME",
|
531
|
-
"
|
531
|
+
"PRICE",
|
532
532
|
"CHANGE",
|
533
533
|
"PCT_CHANGE",
|
534
534
|
"BUY",
|
535
535
|
"SALE",
|
536
|
-
"
|
536
|
+
"CLOSE",
|
537
537
|
"OPEN",
|
538
538
|
"HIGH",
|
539
539
|
"LOW",
|
@@ -44,15 +44,12 @@ def format_stock_code(x, special=""):
|
|
44
44
|
return '%s.SZ' % x
|
45
45
|
if not x[0].isdigit():
|
46
46
|
return x.upper()
|
47
|
-
if str(x[0:3]) in ['920']:
|
47
|
+
if str(x[0:3]) in ['920'] or str(x[0]) in ['8', '4']:
|
48
48
|
x = x.zfill(stock_len) if len(x) < stock_len else x
|
49
49
|
return '%s.BJ' % x
|
50
|
-
if str(x[0]) in ['5', '6'
|
50
|
+
if str(x[0]) in ['5', '6'] or str(x[0:3]) in ['900']:
|
51
51
|
x = x.zfill(stock_len) if len(x) < stock_len else x
|
52
52
|
return '%s.SH' % x
|
53
|
-
elif str(x[0]) in ['8', '4']:
|
54
|
-
x = x.zfill(stock_len) if len(x) < stock_len else x
|
55
|
-
return '%s.BJ' % x
|
56
53
|
else:
|
57
54
|
x = x.zfill(stock_len) if len(x) < stock_len else x
|
58
55
|
return '%s.SZ' % x
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: tushare
|
3
|
-
Version: 1.4.
|
3
|
+
Version: 1.4.20
|
4
4
|
Summary: A utility for crawling historical and Real-time Quotes data of China stocks
|
5
5
|
Home-page: https://tushare.pro
|
6
6
|
Author: Jimmy Liu
|
@@ -80,6 +80,10 @@ return::
|
|
80
80
|
|
81
81
|
Log
|
82
82
|
--------------
|
83
|
+
1.4.20
|
84
|
+
-------
|
85
|
+
- 修复 realtime_list 数值对应问题 close->price pre_close->close
|
86
|
+
--------------
|
83
87
|
1.4.19
|
84
88
|
-------
|
85
89
|
- 修复 realtime_list 返回数据不全的问题
|
@@ -1,4 +1,4 @@
|
|
1
|
-
tushare/__init__.py,sha256=
|
1
|
+
tushare/__init__.py,sha256=1-G9qQDj8PWK8k29c1Ue5maW2VSlZG28yARU928j2Ak,4778
|
2
2
|
tushare/bond/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
tushare/bond/bonds.py,sha256=PJM0xDiWZDpOPwDtbEU9PdP0M_Gu0c599YuB1rbZ3r8,232
|
4
4
|
tushare/coins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -35,7 +35,7 @@ tushare/stock/news_vars.py,sha256=CQ18hvyoeScelBCqKgF_rgAufoEALAUT8y_LERvZKHk,45
|
|
35
35
|
tushare/stock/newsevent.py,sha256=STR7C8MjtZlaXTCG0QNaojBuK4-oxP_8hT7ZIvRpbiI,6944
|
36
36
|
tushare/stock/ref_vars.py,sha256=MIxor-2rISl65I32vUzC-z7ZC_QFzG4sxOKDyjLWuU4,4449
|
37
37
|
tushare/stock/reference.py,sha256=x_HZlrP58T-5OTZ7SLdf2Dh9THj1h7cT4wcIp42IHFI,38227
|
38
|
-
tushare/stock/rtq.py,sha256=
|
38
|
+
tushare/stock/rtq.py,sha256=9AFwrtdvj5v6xXY2DO502BdAdvmBu1LMZdPSU6J2V4I,23925
|
39
39
|
tushare/stock/rtq_vars.py,sha256=V6LeJkSP76z8veRfP_mGiQ63V5YBHoTMaqUA5hSBWh4,4200
|
40
40
|
tushare/stock/shibor.py,sha256=Fx9OUZ429kz6l7ZdaYSD6p_X79ud69PDM9EZogm8xCY,6422
|
41
41
|
tushare/stock/trading.py,sha256=3bvM4pexEYW-uGGEL7g6Vkte4sqGC1iYO6dC8mGLSdM,55619
|
@@ -61,7 +61,7 @@ tushare/util/common.py,sha256=KG86VdlhfnOf0j6SE2bBeowC_7Z54RqWpVnudS6KvEU,2581
|
|
61
61
|
tushare/util/conns.py,sha256=mkcxGGD7-13GXMlrwmo4LMecmgWdm63I8KDpvcW53cI,1456
|
62
62
|
tushare/util/dateu.py,sha256=YSvPvOlMY0qvT2IDwFNOHxTLBrPQ9ULGO7ljfu9tK3s,2931
|
63
63
|
tushare/util/form_date.py,sha256=4nnjp6xo40FftsRP9YY1FJoPErxaWVCkjIp_3O1Qy7M,1119
|
64
|
-
tushare/util/format_stock_code.py,sha256=
|
64
|
+
tushare/util/format_stock_code.py,sha256=co-CSYYu7m7B5W2guWeo4AHMu0fov8PRdy5gdGiGzIg,3563
|
65
65
|
tushare/util/formula.py,sha256=XZVK1NTF8BTrCo78EHLzjAM_wLAjxybrN7Q-6HCHmCo,6863
|
66
66
|
tushare/util/mailmerge.py,sha256=y_QkfHvH8nQ7peC8wQs5idB6xW9PYzzrBynzxgo924M,8980
|
67
67
|
tushare/util/netbase.py,sha256=URvOTLJSgO7e6uCmHHD9EeQ2TRvjpxIEF-wQaWx5cKE,942
|
@@ -72,8 +72,8 @@ tushare/util/verify_token.py,sha256=cuV3RErWbOC318NANCYL6K1LKZ3wSAL2yMwZHA7tD3s,
|
|
72
72
|
tushare/util/protobuf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
73
73
|
tushare/util/protobuf/funcs.py,sha256=UCdK8FxTyjPZsNzoEeXqYzqrQXUmRMvW5hua6GPA66A,779
|
74
74
|
tushare/util/protobuf/response_pb2.py,sha256=vJH9ONkDuJlg6y-q1PvuDZoviKrK7hzNtMieQHK45DI,11347
|
75
|
-
tushare-1.4.
|
76
|
-
tushare-1.4.
|
77
|
-
tushare-1.4.
|
78
|
-
tushare-1.4.
|
79
|
-
tushare-1.4.
|
75
|
+
tushare-1.4.20.dist-info/LICENSE,sha256=C2j55UI0Ul-1-wA1-rn7OaY6b3vGl4YukiyvYzHsU9o,1503
|
76
|
+
tushare-1.4.20.dist-info/METADATA,sha256=CynEim02cLXJTw0u1KcZks_yTYH3uB7tYsrY-J0chNs,3216
|
77
|
+
tushare-1.4.20.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
|
78
|
+
tushare-1.4.20.dist-info/top_level.txt,sha256=HHOxMuqc31KuAIcxpE0t5dAPMKbaiRtjsjTMFd7FlXI,8
|
79
|
+
tushare-1.4.20.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|