แผนกที่มีนักศึกษาลงทะเบียนมากที่สุดชื่ออะไร?
What is the name of the department that has the largest number of students enrolled?
df_enroll = pd.DataFrame(columns=['class_code']); df_class = pd.DataFrame(columns=['class_code', 'crs_code']); df_course = pd.DataFrame(columns=['dept_code', 'crs_code']); df_department = pd.DataFrame(columns=['dept_name', 'dept_code'])
df_class.merge(df_enroll, on='class_code').merge(df_course, on='crs_code').merge(df_department, on='dept_code').groupby('dept_code').size().idxmax()