Given users(user_id, age, city), replace null age with 0 and null city with 'UNKNOWN'. Return the full DataFrame sorted by user_id asc.
| user_id | age | city |
|---|---|---|
| 1 | Hyderabad | |
| 2 | Mumbai | |
| 3 | ||
| 4 | 30 | Mumbai |
| 5 | Delhi | |
| 6 | Mumbai |
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
users10 rows| user_id (int) | age (int) | city (string) |
|---|---|---|
| 1 | null | Hyderabad |
| 2 | null | Mumbai |
| 3 | null | null |
| 4 | 30 | Mumbai |
| 5 | null | Delhi |
| 6 | null | Mumbai |
| 7 | 77 | Delhi |
| 8 | 48 | Mumbai |
| 9 | null | Bengaluru |
| 10 | null | null |
Column names and order must match. Sort order is specified in the question.