An HDFC-style UPI rewards team pays cashback on eligible transactions.
Return txn_id, cashback_amount, where cashback is amount * cashback_pct / 100, rounded to 2 decimal places. Sort by txn_id ascending.
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
transactions6 rows| txn_id (int) | merchant (string) | amount (double) | cashback_pct (double) |
|---|---|---|---|
| 1 | Swiggy | 450 | 5 |
| 2 | BigBasket | 1200 | 2.5 |
| 3 | Uber | 300 | 10 |
| 4 | Amazon | 2500 | 1.5 |
| 5 | Electricity | 800 | 2 |
| 6 | Local Store | 150 | 0 |
Column names and order must match. Sort order is specified in the question.