The inventory table stores units on hand and unit cost.
Return product_id, inventory_value, where the value is units * unit_cost, rounded to 2 decimal places. Sort by product_id ascending.
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
inventory5 rows| product_id (string) | units (int) | unit_cost (double) |
|---|---|---|
| P1 | 10 | 5.5 |
| P2 | 0 | 9.99 |
| P3 | 25 | 2.4 |
| P4 | 7 | 12.5 |
| P5 | 3 | 100 |
Column names and order must match. Sort order is specified in the question.