ค้นหาชื่อลูกค้าที่เคยใช้บริการทั้ง "ปิดกรมธรรม์" และบริการ "สมัครกรมธรรม์ใหม่"
Find the names of customers who have used both the service "Close a policy" and the service "New policy application".
df_fnol = pd.DataFrame(columns=['customer_id', 'service_id']); df_customers = pd.DataFrame(columns=['customer_name', 'customer_id']); df_services = pd.DataFrame(columns=['service_id', 'service_name'])
df_customers.set_index('customer_id').loc[df_fnol[df_fnol['service_id'].isin(df_services[df_services['service_name'] == 'Close a policy']['service_id'])]['customer_id'].intersection(df_fnol[df_fnol['service_id'].isin(df_services[df_services['service_name'] == 'New policy application']['service_id'])]['customer_id']), 'customer_name'].unique().tolist()