Learn by fixing tests
© 2025-2026 Alex Cole. All Rights Reserved.
Spark Koans is an independent community tool.
Keep all rows from the left DataFrame, even without matches. Replace ___ with the correct code.
___ blanks in the code editor with the correct PySpark code, then hit Run Code. Stuck? Try the Hint button.employees = spark.createDataFrame([
(1, "Alice", 101),
(2, "Bob", 102),
(3, "Charlie", 999) # No matching department!
], ["emp_id", "name", "dept_id"])
departments = spark.createDataFrame([
(101, "Engineering"),
(102, "Sales")
], ["dept_id", "dept_name"])Output will appear here...