จำนวนคูปองของคูปองที่เป็นของลูกค้าทั้งดีและไม่ดีคือเท่าใด
What are the coupon amount of the coupons owned by both good and bad customers?
df_discount_coupons = pd.DataFrame(columns=['coupon_amount', 'coupon_id']); df_customers = pd.DataFrame(columns=['coupon_id', 'good_or_bad_customer'])
df_discount_coupons[df_discount_coupons['coupon_id'].isin(df_customers[df_customers['good_or_bad_customer'] == 'good']['coupon_id']) & df_discount_coupons['coupon_id'].isin(df_customers[df_customers['good_or_bad_customer'] == 'bad']['coupon_id'])]['coupon_amount']