Given a sessions DataFrame, return rows where duration_sec > 600. Project the columns session_id, user_id, duration_sec and order by session_id ascending.
sessions| session_id | user_id | duration_sec | platform |
|---|---|---|---|
| 500 | 8 | 3352 | Android |
| 501 | 8 | 819 | Web |
| 502 | 16 | 1457 | Web |
| 503 | 1 | 115 | Android |
| 504 | 16 | 1062 | iOS |
| 505 | 20 | 1411 | Android |
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
sessions10 rows| session_id (int) | user_id (int) | duration_sec (int) | platform (string) |
|---|---|---|---|
| 500 | 8 | 3352 | Android |
| 501 | 8 | 819 | Web |
| 502 | 16 | 1457 | Web |
| 503 | 1 | 115 | Android |
| 504 | 16 | 1062 | iOS |
| 505 | 20 | 1411 | Android |
| 506 | 12 | 1494 | iOS |
| 507 | 8 | 419 | iOS |
| 508 | 16 | 806 | Android |
| 509 | 7 | 1977 | Web |
Column names and order must match. Sort order is specified in the question.