Learn by fixing tests
© 2025-2026 Alex Cole. All Rights Reserved.
Spark Koans is an independent community tool.
Calculate multiple aggregations at once. Replace ___ with the correct code.
___
data = [ ("Sales", 5000), ("Sales", 4500), ("Sales", 6000), ("Engineering", 6000), ("Engineering", 6500) ] df = spark.createDataFrame(data, ["department", "salary"])
Output will appear here...