PySpark data engineering interview problem. Difficulty: intermediate. Pattern: Aggregation. About 16 minutes. Part of the Pro drill bank.
Most frequent amount value. Treat this as a production helper: match the contracted return shape, including empty and duplicate inputs.
Return one row with mode_amount equal to the most frequent amount (ties → smaller amount). Assign result.
Input: repeated amounts Output: mode_amount 10.0 10 appears three times.
Topics: lakebench, pyspark, mode, groupBy.
More PySpark interview questions · All interview problems · Learn data engineering
Interview-style drill: Most frequent amount value.
Return one row with `mode_amount` equal to the most frequent `amount` (ties → smaller amount). Assign `result`.