Back to problems

Clean, split, merge, and aggregate with pandas

Algorithm · Uber · Hard

You are given two CSV files. Use pandas to clean the data, split strings, merge the two tables, and aggregate the result per driver. drivers.csv trips.csv Complete the following steps: Load both files into DataFrames. Show head(2) and tail(1) of trips to verify the ingest. Drop rows in trips with a missing fare_usd, or with a missing or empty route (after stripping whitespace). Ensure fare_usd is numeric. Split the route column on ' ' into origin and destination columns and…

Checking your access…