← Uber Interview Insights

Uber·Data Scientist·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
May 2026

Summary

Uber data scientist interview with a pandas/Python coding question followed by a product case study. The coding part was more forgiving than expected since the interviewer cared about logic over syntax, but the case study follow-up caught me a bit flat-footed.

Questions Asked (2)

Q1

Given a DataFrame of orders with columns like order_id, city, order_type, and status, compute the completion rate (completed / total) for a specific city and order_type combination. Handle edge cases like NaN values, zero denominators, and case sensitivity.

Product Analytics & MetricsAlgorithms & Data Structures
Author's notes

I went straight to 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 exact definition of 'completed' status and the expected input format, then outline a robust pandas-based solution that filters the DataFrame for the given city and order_type, normalizes case, handles NaN values, and computes the completion rate with a safe division. Emphasize edge-case handling and validation, and discuss how to make the function reusable and testable.

Pro tip: Mention that in production, you'd also consider time windows (e.g., completed within X days) and that you'd validate the result against a SQL query or a known metric to ensure consistency. This shows you think beyond the immediate code and understand business context.

1. Clarify requirements and assumptions

Ask clarifying questions: What defines 'completed'? Are there other statuses? Should the comparison be case-insensitive? What to return if no orders match? Confirm the expected output format (e.g., a float or a DataFrame).

2. Preprocess and filter data

Normalize case for city and order_type columns (e.g., using .str.lower() or .str.casefold()), handle NaN values by dropping or filling them appropriately, and filter the DataFrame for the specified city and order_type.

3. Compute completion rate with edge-case handling

Calculate the number of completed orders and total orders, then compute the rate using a safe division that returns 0 or NaN when the denominator is zero. Use vectorized operations for efficiency.

4. Validate and test

Test the function with edge cases: empty DataFrame, all NaN, zero orders, mixed case inputs, and ensure the result matches manual calculation. Consider adding assertions or unit tests.

5. Discuss scalability and alternatives

Mention how this would scale to large datasets (e.g., using groupby or SQL) and alternative approaches like using pandas .mean() on a boolean series for conciseness.

Key Points to Mention

  • Definition of 'completed' status and how to handle other statuses (e.g., 'cancelled', 'in_progress').
  • Case sensitivity: normalize strings using .str.lower() or .str.casefold() before filtering.
  • Handling NaN values: drop rows with NaN in relevant columns or treat them as non-completed.
  • Zero denominator: use a conditional or np.divide with where to avoid division by zero, returning 0 or NaN as appropriate.
  • Efficiency: use vectorized pandas operations instead of loops; consider groupby for multiple combinations.
  • Validation: cross-check with a SQL query or manual count, and write unit tests for edge cases.

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 root causes would you hypothesize 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 I rambled.

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 the drop (e.g., by time, user cohort, or product line). Then generate hypotheses across the rider funnel—acquisition, conversion, and retention—and validate each with data. Finally, prioritize interventions based on impact and ease of implementation.

Pro tip: Always tie your hypotheses to actionable metrics and consider the cost of false positives; a quick A/B test on the most likely cause can save weeks of analysis.

1. Clarify and Segment

Confirm what 'completion rate' means (e.g., completed rides / requested rides) and segment by time, user type, and product to pinpoint the drop.

2. Generate Hypotheses

Brainstorm potential root causes across the rider journey: supply (driver availability), demand (rider intent), pricing, product changes, and external factors.

3. Validate with Data

For each hypothesis, identify the data needed and run analyses (e.g., funnel analysis, cohort comparison, correlation with external events) to confirm or reject.

4. Prioritize Interventions

Rank validated causes by impact (potential lift in completion rate) and effort (implementation complexity), then choose the first intervention.

5. Propose and Test

Suggest a specific intervention (e.g., increase driver incentives, fix a bug) and outline how to measure its success via A/B test.

Key Points to Mention

  • Define the metric precisely and check for data quality issues.
  • Segment by dimensions like time, location, user cohort, and product type.
  • Consider supply-side factors (driver availability, incentives) and demand-side factors (pricing, ETA accuracy).
  • Look for external events (weather, competitors, holidays) that might correlate.
  • Use funnel analysis to identify where in the process users drop off.
  • Prioritize interventions using impact/effort matrix and suggest a quick experiment.

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