Given orders, return rows where status = 'cancelled'. Project order_id, user_id, amount and order by order_id ascending.
| order_id | user_id | status | amount |
|---|---|---|---|
| 300 | 15 | returned | 235.46 |
| 301 | 9 | returned | 759.05 |
| 302 | 13 | shipped | 294.19 |
| 303 | 10 | shipped | 373.23 |
| 304 | 12 | shipped | 199.79 |
| 305 | 4 | packed | 245.85 |
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
orders10 rows| order_id (int) | user_id (int) | status (string) | amount (double) |
|---|---|---|---|
| 300 | 15 | returned | 235.46 |
| 301 | 9 | returned | 759.05 |
| 302 | 13 | shipped | 294.19 |
| 303 | 10 | shipped | 373.23 |
| 304 | 12 | shipped | 199.79 |
| 305 | 4 | packed | 245.85 |
| 306 | 3 | shipped | 883.4 |
| 307 | 10 | packed | 326.69 |
| 308 | 7 | shipped | 991.46 |
| 309 | 9 | cancelled | 231.92 |
Column names and order must match. Sort order is specified in the question.