An Instagram-style stories team tracks how many viewers finish each story.
Return story_id, completion_pct, where completion rate is completions / views * 100, rounded to 2 decimal places. Sort by story_id ascending.
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
stories6 rows| story_id (int) | story_name (string) | views (int) | completions (int) |
|---|---|---|---|
| 1 | Launch Teaser | 10000 | 8500 |
| 2 | Behind the Scenes | 8000 | 6000 |
| 3 | Product Drop | 12000 | 11400 |
| 4 | Q&A | 5000 | 2500 |
| 5 | Poll | 6000 | 4500 |
| 6 | Recap | 9000 | 8100 |
Column names and order must match. Sort order is specified in the question.