new_sanwei
chaopower 2024-09-12 10:18:42 +08:00
parent 3f3c890eea
commit 01cdc59321
1 changed files with 6 additions and 2 deletions

View File

@ -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')