Learn by fixing tests
© 2025-2026 Alex Cole. All Rights Reserved.
Spark Koans is an independent community tool.
Learn how to select specific columns from a DataFrame. Replace ___ with the correct code.
___
data = [("Alice", 34, "NYC"), ("Bob", 45, "LA"), ("Charlie", 29, "Chicago")] df = spark.createDataFrame(data, ["name", "age", "city"])
Output will appear here...