โ† NielsenIQ questions
CodingReported in a candidate post, Sep 2025

PySpark taxi-trip CSV: load, cast timestamps, classify duration with a UDF

Filed under NielsenIQ

The question

Load a trips CSV (pickup/dropoff datetime, passenger count, distance, duration) into a Spark DataFrame with inferred schema, convert the two datetime columns to timestamps, then write a UDF labelling each trip short (15 min or less), medium (over 15 up to 30) or long (over 30).

No write-up yet. Related questions below have one.

Related NielsenIQ questions

Collected from public candidate posts and coding forums. Updated Nov 2026.