ค้นหาขั้นตอนทั้งหมดที่มีค่าใช้จ่ายมากกว่า 1,000 หรือแพทย์ที่ John Wen ได้รับการฝึกอบรมมา
Find all procedures which cost more than 1000 or which physician John Wen was trained in.
df_trained_in = pd.DataFrame(columns=['physician', 'treatment']); df_procedures = pd.DataFrame(columns=['name', 'cost']); df_physician = pd.DataFrame(columns=['employeeid', 'name']); df_procedures = pd.DataFrame(columns=['name', 'code'])
pd.concat([df_procedures[df_procedures['cost']>1000]['name'], df_procedures[df_procedures['code'].isin(df_trained_in[df_trained_in['physician']==df_physician[df_physician['name']=='John Wen']['employeeid'].values[0]]['treatment'])]['name']]).drop_duplicates()