ค้นหาจำนวนนักเรียนหญิง (เพศ F) ที่อาศัยอยู่ใน Smith Hall
Find the number of female students (with F sex) living in Smith Hall
df_lives_in = pd.DataFrame(columns=['stuid', 'dormid']); df_student = pd.DataFrame(columns=['stuid', 'sex']); df_dorm = pd.DataFrame(columns=['dormid', 'dorm_name'])
len(df_student[(df_student['sex'] == 'F') & df_student['stuid'].isin(df_lives_in[df_lives_in['dormid'].isin(df_dorm[df_dorm['dorm_name'] == 'Smith Hall']['dormid'])]['stuid'])])