Skip to content

PySpark interview roadmap

All 69 problems in a suggested order, from fundamentals to advanced patterns; each step goes from easy to hard.

1. Filtering & Selection

select, filter, sort and de-duplicate rows

2. Conditional Logic

when/otherwise and derived columns

3. Null Handling

coalesce, fillna and three-valued logic

4. Aggregations

groupBy, agg, percentiles and conditional metrics

5. Strings

clean and transform text columns

6. Dates

parse, shift and compare dates

7. Joins

inner, left, anti and semi joins across DataFrames

8. Arrays

split, explode and work with array columns

9. Window Functions

rank, lag, lead and running totals over partitions

10. Pivot, Unpivot & Rollup

pivot, unpivot, rollup, cube and grouping sets