From 01cdc59321acb42eee2f36aafcddc802c2535bbe Mon Sep 17 00:00:00 2001 From: chaopower Date: Thu, 12 Sep 2024 10:18:42 +0800 Subject: [PATCH] bug --- tools/t7.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/t7.py b/tools/t7.py index 7960edc..a7ff427 100644 --- a/tools/t7.py +++ b/tools/t7.py @@ -512,11 +512,15 @@ class AutoLayout: ori_library_df.loc[barcode_mask, 'indexi5'] = ori_library_df.loc[barcode_mask, 'indexi5'].str[-8:] ori_library_df.loc[barcode_mask, 'indexi7'] = ori_library_df.loc[barcode_mask, 'indexi7'].str[-8:] + # 非上海实验室 + no_need_lab_mask = ori_library_df['createdbyorgid'].str.len() != '上海实验室' + ori_library_df['note'] = '' ori_library_df.loc[~numeric_mask, 'note'] = 'data_needed 列非数字' ori_library_df.loc[~time_mask, 'note'] = 'time 列非日期' ori_library_df.loc[barcode_mask, 'note'] = '非16位barcode,已修改' - no_ori_data = ori_library_df[~(numeric_mask & time_mask)] + ori_library_df.loc[no_need_lab_mask, 'note'] = '非上海实验室' + no_ori_data = ori_library_df[~(numeric_mask & time_mask & no_need_lab_mask)] self.no_assign_data.extend(no_ori_data.to_dict('records')) @@ -526,7 +530,7 @@ class AutoLayout: self.order_assign_data = ori_library_df[orderlane_mask].to_dict('records') # 使用布尔索引筛选出不是数字和非日期的行,包lane的 - ori_library_df = ori_library_df[(numeric_mask & time_mask) & (~orderlane_mask)] + ori_library_df = ori_library_df[(numeric_mask & time_mask) & (~orderlane_mask) & (~no_need_lab_mask)] # 时间格式化 ori_library_df['createdtime'] = pd.to_datetime(ori_library_df['createdtime'], errors='coerce')