Medium PySpark problems
27 medium PySpark coding problems covering the patterns interviews ask most. Write DataFrame code and get graded instantly.
- Customers Without Orders · Medium · Joins
- Employees and Their Departments · Medium · Joins
- Latest Order per Customer · Medium · Window Functions
- Running Total by Region · Medium · Window Functions
- Top Two Salary Levels per Department · Medium · Window Functions
- Month-over-Month Change · Medium · Window Functions
- Word Count · Medium · Arrays
- Pivot Quarterly Revenue · Medium · Pivot, Unpivot & Rollup
- Unpivot Wide Columns to Rows · Medium · Pivot, Unpivot & Rollup
- Conditional Aggregation · Medium · Aggregations
- 7-Day Moving Average · Medium · Window Functions
- Share of Category Total · Medium · Window Functions
- Customer Spend Quartiles (NTILE) · Medium · Window Functions
- Percent Rank and Cumulative Distribution · Medium · Window Functions
- Entry and Exit Pages (MAX_BY / MIN_BY) · Medium · Aggregations
- Year-over-Year Growth · Medium · Joins
- New Users per Day · Medium · Aggregations
- Median and 90th Percentile · Medium · Aggregations
- Employees Earning More than Their Manager · Medium · Joins
- Joining on Nullable Keys · Medium · Joins
- Combine Batches with Schema Drift · Medium · Filtering & Selection
- Data Quality: Null Count per Column · Medium · Null Handling
- Item Positions in a Basket (POSEXPLODE) · Medium · Arrays
- Keep Users with No Interests (EXPLODE_OUTER) · Medium · Arrays
- Sorted Distinct Purchase List · Medium · Arrays
- Month Start, Month End and Due Dates · Medium · Dates
- Parse Application Log Lines · Medium · Strings
Browse
Topics: Window Functions · Joins · Aggregations · Pivot, Unpivot & Rollup · Arrays · Null Handling · Conditional Logic · Dates · Filtering & Selection · Strings
Difficulty: Easy · Medium · Hard · PySpark interview roadmap · All problems