Corporate at The Daily Grind is launching a "Tip-Top Barista" award, and naturally they want data instead of vibes. The metric: which orders tipped at least 20% of the drink price?
Same orders DataFrame as before:
Your task:
- Compute each order's tip percentage as
tip / price, in a column namedtip_pct. - Keep only orders where
tip_pctis at least0.20. - Return
order_id,drink, andtip_pct.
Assign the DataFrame to result. Row order doesn't matter, and tip_pct is compared with a float tolerance — no need to round.