← Uber Interview Insights

Uber·Machine Learning Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Uber MLE interview with a pandas-heavy data wrangling question. Not the ML theory I was expecting, more like a data engineering exercise dressed up as a business metrics problem.

Questions Asked (1)

Q1

You have three DataFrames for a food delivery platform: orders (with order_id, product_id, quantity, unit_price, status), products (with product_id, category_id), and categories (with category_id, category_name). Join them and compute per-category metrics: total sales as sum of quantity times unit_price, average sales per order line, and completion rate as the fraction of rows where status equals 'completed'.

Product Analytics & MetricsData Modeling
Author's notes

Took me a second to realize this was three-way join territory and not just two tables.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the grain of each DataFrame and the join keys, then perform a left join from orders to products to categories to preserve all order lines. Compute the three metrics per category using groupby aggregations, ensuring that completion rate is calculated as the mean of a boolean indicator for status == 'completed'. Finally, validate the results and discuss any edge cases or assumptions.

Pro tip: Mention that you would check for duplicate product_id or category_id in the dimension tables before joining, as duplicates would inflate sales metrics. Also, consider whether to include only completed orders for sales metrics or all orders, and state your assumption clearly.

1. Understand the data and define the join

Examine the schema and grain of each DataFrame. Identify that orders is the fact table, products and categories are dimension tables, and the join keys are product_id and category_id. Decide on the join type (likely left join to keep all orders).

2. Perform the joins

Join orders to products on product_id, then join the result to categories on category_id. Ensure the joins are correct and handle any missing matches appropriately.

3. Compute per-category metrics

Create a new column for sales (quantity * unit_price). Group by category_name (or category_id) and compute: total sales as sum of sales, average sales per order line as mean of sales, and completion rate as mean of (status == 'completed').

4. Validate and interpret results

Check for anomalies, such as categories with zero orders or unexpected completion rates. Discuss any assumptions made (e.g., whether to include non-completed orders in sales metrics) and how they affect the results.

Key Points to Mention

  • Join keys and order of joins: orders -> products -> categories
  • Grain of the data: each row in orders represents an order line, not an order
  • Definition of sales: quantity * unit_price, and whether to include only completed orders
  • Completion rate calculation: mean of boolean indicator for status == 'completed'
  • Handling missing or duplicate dimension records (e.g., products without categories)
  • Use of groupby and aggregation functions in pandas (or SQL) for efficient computation

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