bug 药物匹配
parent
732c0df038
commit
9c660fcfed
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Reference in New Issue