|
@@ -157,11 +157,11 @@ def verify_process(min_batch_time_str, max_batch_time_str):
|
|
|
valid_end_dt = pd.to_datetime(
|
|
valid_end_dt = pd.to_datetime(
|
|
|
df_keep_info_del.get("valid_end_hour"), format="%Y-%m-%d %H:%M:%S", errors="coerce"
|
|
df_keep_info_del.get("valid_end_hour"), format="%Y-%m-%d %H:%M:%S", errors="coerce"
|
|
|
)
|
|
)
|
|
|
- status_flag = pd.Series(2, index=df_keep_info_del.index, dtype="int64")
|
|
|
|
|
- status_flag.loc[price_diff_num > 0] = 1
|
|
|
|
|
|
|
+ status_flag = pd.Series(0, index=df_keep_info_del.index, dtype="int64") # 默认状态 0
|
|
|
|
|
+ status_flag.loc[price_diff_num > 0] = 1 # 降价状态 1
|
|
|
mask_zero = price_diff_num == 0
|
|
mask_zero = price_diff_num == 0
|
|
|
mask_time_ok = mask_zero & del_batch_dt.notna() & valid_end_dt.notna() & (del_batch_dt >= valid_end_dt)
|
|
mask_time_ok = mask_zero & del_batch_dt.notna() & valid_end_dt.notna() & (del_batch_dt >= valid_end_dt)
|
|
|
- status_flag.loc[mask_time_ok] = 0
|
|
|
|
|
|
|
+ status_flag.loc[mask_time_ok] = 2 # 超时状态 2
|
|
|
df_keep_info_del["status_flag"] = status_flag
|
|
df_keep_info_del["status_flag"] = status_flag
|
|
|
|
|
|
|
|
write_header = not os.path.exists(output_path)
|
|
write_header = not os.path.exists(output_path)
|
|
@@ -175,7 +175,7 @@ def verify_process(min_batch_time_str, max_batch_time_str):
|
|
|
|
|
|
|
|
def verify_process_2(min_batch_time_str, max_batch_time_str):
|
|
def verify_process_2(min_batch_time_str, max_batch_time_str):
|
|
|
|
|
|
|
|
- object_dir = "/home/node04/descending_cabin_files"
|
|
|
|
|
|
|
+ object_dir = "/home/node04/descending_cabin_files_vj"
|
|
|
|
|
|
|
|
output_dir = f"./validate/keep"
|
|
output_dir = f"./validate/keep"
|
|
|
os.makedirs(output_dir, exist_ok=True)
|
|
os.makedirs(output_dir, exist_ok=True)
|
|
@@ -376,5 +376,5 @@ def verify_process_2(min_batch_time_str, max_batch_time_str):
|
|
|
return
|
|
return
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
if __name__ == "__main__":
|
|
|
- # verify_process("202604021500", "202604030900")
|
|
|
|
|
- verify_process_2("202604031700", "202604071300")
|
|
|
|
|
|
|
+ # verify_process("202604071700", "202604090900")
|
|
|
|
|
+ verify_process_2("202604071700", "202604090900")
|