ลูกค้าที่ทำการเคลมจำนวนมากที่สุดในการเคลมครั้งเดียวชื่ออะไร?
What is the name of the customer who has made the largest amount of claim in a single claim?
df_customers = pd.DataFrame(columns = ['customer_id', 'customer_details']); df_claim_headers = pd.DataFrame(columns = ['policy_id', 'amount_claimed']); df_policies = pd.DataFrame(columns = ['policy_id', 'customer_id'])
max_claim_policy_id = df_claim_headers.loc[df_claim_headers['amount_claimed'].idxmax(), 'policy_id']; customer_id = df_policies.loc[df_policies['policy_id'] == max_claim_policy_id, 'customer_id'].values[0]; customer_name = df_customers.loc[df_customers['customer_id'] == customer_id, 'customer_details'].values[0]; customer_name