mns-common 1.5.1.1__py3-none-any.whl → 1.5.1.4__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 mns-common might be problematic. Click here for more details.

@@ -141,7 +141,7 @@ def convert_statistics(stat):
141
141
  def get_real_time_zt_info():
142
142
  real_time_df = em_real_time_quotes_api.get_real_time_quotes_now(None, None)
143
143
  real_time_df_zt = real_time_df.loc[
144
- (real_time_df['chg'] > common_service_fun_api.ZT_CHG) & (real_time_df['wei_bi'] == 100)]
144
+ (real_time_df['chg'] > common_service_fun_api.ZT_CHG) | (real_time_df['wei_bi'] == 100)]
145
145
  if data_frame_util.is_empty(real_time_df_zt):
146
146
  return pd.DataFrame()
147
147
  real_time_df_zt = real_time_df_zt[[
@@ -344,10 +344,6 @@ def merge_zt_reason(now_zt_pool_df, str_day, last_trade_zt, now_continue_zt):
344
344
  zt_reason_df_copy = zt_reason_df_copy.set_index(['symbol'], drop=True)
345
345
  now_zt_pool_df = now_zt_pool_df.set_index(['symbol'], drop=False)
346
346
 
347
- result_zt_df = pd.merge(now_zt_pool_df, zt_reason_df_copy, how='outer',
348
- left_index=True, right_index=True)
349
-
350
- now_zt_pool_df['main_line'] = ''
351
347
  if data_frame_util.is_not_empty(now_continue_zt):
352
348
  now_continue_zt = now_continue_zt[['symbol', 'main_line']]
353
349
 
@@ -357,6 +353,9 @@ def merge_zt_reason(now_zt_pool_df, str_day, last_trade_zt, now_continue_zt):
357
353
  # 使用 map 更新 main_line 列
358
354
  now_zt_pool_df['main_line'] = now_zt_pool_df['symbol'].map(main_line_mapping).fillna("")
359
355
 
356
+ result_zt_df = pd.merge(now_zt_pool_df, zt_reason_df_copy, how='outer',
357
+ left_index=True, right_index=True)
358
+
360
359
  # 找出 'symbol' 列中为 NaN 值的数据
361
360
  zt_reason_na = result_zt_df[result_zt_df['zt_reason'].isna()]
362
361
  zt_reason_not_na = result_zt_df[result_zt_df['zt_reason'].notna()]
@@ -364,8 +363,10 @@ def merge_zt_reason(now_zt_pool_df, str_day, last_trade_zt, now_continue_zt):
364
363
  last_trade_zt_copy = last_trade_zt_copy.set_index(['symbol'], drop=True)
365
364
  del zt_reason_na['zt_reason']
366
365
  zt_reason_na = zt_reason_na.set_index(['symbol'], drop=False)
366
+ del last_trade_zt_copy['main_line']
367
367
  zt_reason_na = pd.merge(zt_reason_na, last_trade_zt_copy, how='outer',
368
368
  left_index=True, right_index=True)
369
+
369
370
  zt_reason_na['zt_reason'] = zt_reason_na['zt_reason'].fillna('0')
370
371
  # 删除昨日涨停 今日未涨停的
371
372
  zt_reason_na.dropna(subset=['symbol'], inplace=True)
@@ -1,4 +1,4 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mns-common
3
- Version: 1.5.1.1
3
+ Version: 1.5.1.4
4
4
 
@@ -68,7 +68,7 @@ mns_common/api/ths/wen_cai/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK
68
68
  mns_common/api/ths/wen_cai/ths_wen_cai_api.py,sha256=zDwZyh60sHdJ_folWDVZmLD1mndKc40Ltc4JbL12HF4,4935
69
69
  mns_common/api/ths/zt/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
70
70
  mns_common/api/ths/zt/ths_stock_zt_pool_api.py,sha256=NAfyOWWROVpCRlw3jcCxPLQMwR8m0jt9tfIZT7Jr1UE,10690
71
- mns_common/api/ths/zt/ths_stock_zt_pool_v2_api.py,sha256=veKMkrhXYlAQ-0wo6Ggt02zWpfvlMXANdkQKV-SLrdg,19510
71
+ mns_common/api/ths/zt/ths_stock_zt_pool_v2_api.py,sha256=3ADUkXpf9FsXsg3r2_bQmdjkxhwB08UtVyTUGes9TnI,19515
72
72
  mns_common/api/us/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
73
73
  mns_common/api/us/ths_us_company_info_api.py,sha256=qQjv4F-ovQ2uuu-FlBAnxjvVA7qj9y_x5WZtUoyoEW4,241
74
74
  mns_common/api/xueqiu/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
@@ -158,7 +158,7 @@ mns_common/utils/date_handle_util.py,sha256=XS-MyA8_7k35LOCFAYOHgVcVkMft_Kc4Wa9U
158
158
  mns_common/utils/db_util.py,sha256=hSmfNAN4vEeEaUva6_cicZEhb2jSnib-Gvk2reke1vc,2590
159
159
  mns_common/utils/file_util.py,sha256=egWu6PenGPRp_ixrNTHKarT4dAnOT6FETR82EHUZJnQ,1042
160
160
  mns_common/utils/ip_util.py,sha256=UTcYfz_uytB__6nlBf7T-izuI7hi4XdB6ET0sJgEel4,969
161
- mns_common-1.5.1.1.dist-info/METADATA,sha256=sFmTH_Iq7jnjuyU8ekbHzgK7DQBcqC0_xGFFBYx_ZtY,61
162
- mns_common-1.5.1.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
163
- mns_common-1.5.1.1.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
164
- mns_common-1.5.1.1.dist-info/RECORD,,
161
+ mns_common-1.5.1.4.dist-info/METADATA,sha256=pkieOcVjsVxHdYsGMpfzfohYx-DmLR1Lj7lk-mvbxbo,61
162
+ mns_common-1.5.1.4.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
163
+ mns_common-1.5.1.4.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
164
+ mns_common-1.5.1.4.dist-info/RECORD,,