Sum amount per user_id; keep only users whose total > 100.0. Return user_id, total (rounded to 2 decimals) sorted by user_id asc.
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
orders20 rows| user_id (int) | amount (double) |
|---|---|
| 5 | 24.19 |
| 6 | 8.37 |
| 5 | 13.79 |
| 5 | 30.35 |
| 4 | 45.69 |
| 1 | 15.15 |
| 3 | 7.41 |
| 1 | 27.09 |
| 2 | 19.87 |
| 4 | 12.74 |
| 3 | 13.43 |
| 3 | 45.2 |
| 3 | 13.15 |
| 1 | 29.74 |
| 5 | 2.21 |
| 6 | 15.69 |
| 5 | 22.63 |
| 6 | 15.61 |
| 4 | 18.88 |
| 1 | 34.36 |
Column names and order must match. Sort order is specified in the question.