From 9c660fcfed82836e29ba5d0067b5618026aed75b Mon Sep 17 00:00:00 2001 From: chaopower Date: Sun, 4 Feb 2024 13:34:26 +0800 Subject: [PATCH] =?UTF-8?q?bug=20=E8=8D=AF=E7=89=A9=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codes/postprocess.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codes/postprocess.py b/codes/postprocess.py index bfc1578..0ea1333 100755 --- a/codes/postprocess.py +++ b/codes/postprocess.py @@ -33,9 +33,9 @@ def database(): drug_mechanism_df = pd.read_csv(drug_mechanism_path, usecols=list(range(18)), sep='\t') drug_mechanism_df = drug_mechanism_df.fillna('.') drug_mechanism_df['drugs'] = drug_mechanism_df.apply(lambda x: '|'.join( - [tm.upper() for tm in [x['药物名称-英文'], x['药物名称-中文']] if tm != '.']), axis=1) + [tm for tm in [x['药物名称-英文'], x['药物名称-中文']] if tm != '.']), axis=1) drug_mechanism_df['dec'] = drug_mechanism_df.apply(lambda x: "||".join( - [tm.upper() for tm in [x['适应症(中文)'], x['作用机制-中文']] if tm != '.']), axis=1) + [tm for tm in [x['适应症(中文)'], x['作用机制-中文']] if tm != '.']), axis=1) # return {drugA: drugAdes\\\\drugAdes中文, drugA中文: drugAdes\\\\drugAdes中文,} drug_mechanism = {} for _, row in drug_mechanism_df.iterrows():