DrawCode Practice Problem

Top Two Amounts Per Category · Sensor telemetry 24

Sensor telemetry DataFrame, variant 24. Return rows in the top two distinct amount ranks per category as category, id, amount; include ties. Implement `solve(df)` and return a PySpark DataFrame.


Interactive Visualizer Workspace

Explore step-by-step interactive animations, memory state tracking, and live multi-language execution in DrawCode.

Launch Interactive Visualizer