จงหาจำนวนสุนัขที่นักเรียนหญิงเลี้ยงไว้ (เพศ F)
Find the number of dog pets that are raised by female students (with sex F).
df_has_pet = pd.DataFrame(columns=['stuid', 'petid']); df_pets = pd.DataFrame(columns=['petid', 'pettype']); df_student = pd.DataFrame(columns=['stuid', 'sex'])
df_has_pet.merge(df_pets[df_pets['pettype'] == 'dog'], on='petid').merge(df_student[df_student['sex'] == 'F'], on='stuid').shape[0]