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():