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