Count rows per event_type in events and return as event_count. Sort by event_type ascending.
| event_type | event_id |
|---|---|
| purchase | 1 |
| signup | 2 |
| purchase | 3 |
| click | 4 |
| click | 5 |
| purchase | 6 |
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
events10 rows| event_type (string) | event_id (int) |
|---|---|
| purchase | 1 |
| signup | 2 |
| purchase | 3 |
| click | 4 |
| click | 5 |
| purchase | 6 |
| click | 7 |
| click | 8 |
| view | 9 |
| click | 10 |
Column names and order must match. Sort order is specified in the question.