← Uber Interview Insights

Uber·Data Scientist·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
Jun 2026

Summary

Uber data scientist interview with a pandas/Python coding problem centered on computing completion rates from order data, followed by a product case study on diagnosing low completion rates in a specific city. The technical bar felt more like applied analytics than pure algorithms, which I wasn't fully expecting.

Questions Asked (2)

Q1

Given a DataFrame of orders with columns for order_id, city, order_type, and status, compute the completion rate (completed / total) for a given (city, order_type) pair. Handle NaN values, zero denominators, and case sensitivity correctly.

Product Analytics & MetricsAlgorithms & Data Structures
Author's notes

I went straight for pandas groupby and immediately second-guessed myself on NaN handling.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the metric definition and edge cases (NaN, zero denominators, case sensitivity), then outline a vectorized pandas solution that normalizes strings, filters the target (city, order_type) pair, and computes the completion rate with safe division. Emphasize correctness and efficiency, and mention how you'd validate the result.

Pro tip: Mention that you'd normalize case and whitespace before filtering, and use a safe division helper (e.g., np.divide with where or a conditional) to avoid ZeroDivisionError—this shows production-ready thinking.

1. Clarify requirements and edge cases

Confirm the definition of completion rate, how to handle NaN in city/order_type/status, and whether case-insensitive matching is required. Ask about expected output format (scalar vs. DataFrame).

2. Clean and normalize data

Drop or fill NaN values appropriately, and normalize string columns (e.g., str.strip().str.lower()) to ensure case-insensitive matching. Decide whether to treat NaN status as non-completed or exclude it.

3. Filter to the target pair

Create a boolean mask for the given (city, order_type) pair after normalization, and subset the DataFrame. Compute total count and completed count (status == 'completed').

4. Compute rate with safe division

Calculate completion rate as completed / total, handling zero denominator by returning 0 or NaN as appropriate. Use np.divide with where or a conditional to avoid division by zero.

5. Validate and discuss scalability

Sanity-check the result with a small example, and mention vectorization for performance on large DataFrames. Optionally discuss how to extend to multiple pairs using groupby.

Key Points to Mention

  • Case normalization (lowercasing) and whitespace stripping before filtering
  • Handling NaN values: drop, fill, or exclude based on business rules
  • Safe division to avoid zero-denominator errors (e.g., np.divide with where)
  • Vectorized pandas operations for efficiency (boolean masking, no loops)
  • Validation with a small test case or assert statements
  • Extensibility: using groupby to compute rates for all pairs at once

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

If the completion rate for a specific city is unusually low, what are the possible root causes and how would you validate each? Which intervention would you ship first?

Root Cause AnalysisProduct Sense & IdeationProduct Analytics & Metrics
Author's notes

This is where the interview got interesting.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the metric definition and segmenting the data to isolate whether the drop is real, widespread, or localized. Then systematically test hypotheses across the funnel—supply, demand, product, and external factors—using data validation, and prioritize interventions by impact and ease of implementation.

Pro tip: Frame your answer around the metric's numerator and denominator (e.g., completed trips / requested trips) and emphasize checking for data pipeline issues first—many 'drops' are instrumentation bugs, not real behavior changes.

1. Define and Validate the Metric

Clarify what 'completion rate' means (e.g., completed trips / requested trips) and check for data quality issues like logging errors, pipeline delays, or definition changes. Confirm the drop is real and not an artifact.

2. Segment and Localize

Break down the metric by dimensions (time, geography, user segment, product type, device) to see if the drop is concentrated in a specific subgroup or widespread. This narrows down potential causes.

3. Generate and Test Hypotheses

List possible root causes across supply (driver availability, acceptance rate), demand (rider behavior, cancellations), product (app issues, pricing changes), and external factors (weather, events, competitors). Validate each with data (e.g., compare acceptance rates, cancellation reasons, app crash logs).

4. Prioritize Interventions

Assess the impact and feasibility of each validated cause. Choose the intervention with the highest expected lift and lowest cost to implement first, considering potential side effects.

5. Propose a Test and Monitor

Suggest an A/B test or pilot for the chosen intervention, define success metrics, and outline how to monitor the rollout to ensure the fix is effective and doesn't harm other metrics.

Key Points to Mention

  • Metric decomposition: numerator (completed trips) vs. denominator (requested trips) and potential issues with each.
  • Data quality checks: logging errors, pipeline delays, definition changes, or seasonality adjustments.
  • Segmentation by driver supply (e.g., driver acceptance rate, online hours), rider demand (e.g., cancellations, wait times), and product changes (e.g., pricing, app updates).
  • External factors: weather, traffic, local events, competitor promotions, or regulatory changes.
  • Prioritization framework: impact vs. effort, and considering quick wins vs. long-term fixes.
  • Testing methodology: A/B test design, sample size, and guardrail metrics to avoid unintended consequences.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.