วิธีการชำระเงินของลูกค้าที่ซื้อสินค้าจำนวนน้อยที่สุดคืออะไร?
What is the payment method of the customer that has purchased the least quantity of items?
df_order_items = pd.DataFrame(columns=['order_id', 'order_quantity']); df_customers = pd.DataFrame(columns=['payment_method', 'customer_name', 'customer_id']); df_customer_orders = pd.DataFrame(columns=['customer_id', 'order_id'])
df_customers.loc[df_customers['customer_id'].isin(df_customer_orders.loc[df_customer_orders['order_id'].isin(df_order_items.loc[df_order_items['order_quantity'].idxmin(), 'order_id'])]['customer_id']), 'payment_method']