ค้นหานามสกุลของนักเรียนที่มีแมวอายุ 3 ปี
Find the last name of the student who has a cat that is age 3.
student = pd.DataFrame({'lname': list_of_names, 'stuid': list_of_stuids}); has_pet = pd.DataFrame({'stuid': list_of_stuids, 'petid': list_of_petids}); pets = pd.DataFrame({'petid': list_of_petids, 'pet_age': list_of_petages, 'pettype': list_of_pettypes})
student[student['stuid'].isin(has_pet[has_pet['petid'].isin(pets[(pets['pet_age'] == 3) & (pets['pettype'] == 'cat')]['petid'])]['stuid'])]['lname']