ค้นหานามสกุลของนักศึกษาที่ปัจจุบันอาศัยอยู่ในรัฐนอร์ธแคโรไลนา แต่ไม่ได้ลงทะเบียนในหลักสูตรปริญญาใดๆ
Find the last name of the students who currently live in the state of North Carolina but have not registered in any degree program.
df_addresses = pd.DataFrame(columns=['address_id', 'state_province_county']); df_students = pd.DataFrame(columns=['last_name', 'current_address_id', 'student_id']); df_student_enrolments = pd.DataFrame(columns=['student_id'])
df_students.loc[df_students['current_address_id'].isin(df_addresses.loc[df_addresses['state_province_county'] == 'NorthCarolina', 'address_id']) & ~df_students['student_id'].isin(df_student_enrolments['student_id']), 'last_name']