An insurance-style claims team summarizes approved payouts by policy type.
Return policy_type, approved_amount for approved claims. Sort by policy_type ascending.
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
claims7 rows| claim_id (int) | policy_type (string) | status (string) | amount (double) |
|---|---|---|---|
| 1 | Health | approved | 45000 |
| 2 | Auto | rejected | 30000 |
| 3 | Health | approved | 25000 |
| 4 | Home | approved | 60000 |
| 5 | Auto | approved | 18000 |
| 6 | Travel | pending | 12000 |
| 7 | Home | approved | 15000 |
Column names and order must match. Sort order is specified in the question.