ค้นหาชื่อแพทย์สังกัดแผนกศัลยศาสตร์และจิตเวช
Find the name of physicians who are affiliated with both Surgery and Psychiatry departments.
df_affiliated_with = pd.DataFrame(columns=['physician', 'department']); df_department = pd.DataFrame(columns=['DepartmentID', 'name']); df_physician = pd.DataFrame(columns=['name', 'EmployeeID'])
df_physician[df_physician['EmployeeID'].isin(df_affiliated_with[df_affiliated_with['department'] == 'Surgery']['physician']) & df_physician['EmployeeID'].isin(df_affiliated_with[df_affiliated_with['department'] == 'Psychiatry']['physician'])]['name']