การทดสอบทั้งหมดที่มีผล "ล้มเหลว" จะแล้วเสร็จเมื่อใด
What are the completion dates of all the tests that have result "Fail"?
df_tests = pd.DataFrame(columns=['registration_id', 'test_result']); df_enrollment = pd.DataFrame(columns=['date_of_completion', 'registration_id'])
df_enrollment[df_enrollment['registration_id'].isin(df_tests.loc[df_tests['test_result'] == 'Fail', 'registration_id'])]['date_of_completion']