Given orders(user_id, amount), return the sum of amount per user_id as total_amount. Sort by user_id ascending.
| user_id | amount |
|---|---|
| 4 | 189.04 |
| 5 | 67.44 |
| 3 | 13.07 |
| 5 | 67.08 |
| 5 | 145.42 |
| 1 | 166.43 |
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
orders10 rows| user_id (int) | amount (double) |
|---|---|
| 4 | 189.04 |
| 5 | 67.44 |
| 3 | 13.07 |
| 5 | 67.08 |
| 5 | 145.42 |
| 1 | 166.43 |
| 5 | 166.69 |
| 5 | 86.28 |
| 2 | 75.96 |
| 4 | 120.75 |
Column names and order must match. Sort order is specified in the question.