Pandas interview questions for data analysts
Work with DataFrames from a grocery delivery app: reshape tables, calculate metrics and repair a colleague’s notebook. Read the example input and expected output here, then run real pandas in your browser. The exercises are free and need no account.
10 questions · Easy to hard · Real pandas in your browser
Easy Pandas questions
- Rolling 7-day revenueEasy · Rolling aggregates
- Find the bugs in an average order value notebookEasy · Code review
- Wide-to-long reshapingEasy · Pivot and unpivot
- Detect dirty product names by groupEasy · Strings and text
- UTC timestamps to local datesEasy · Time zones
- ARPU and ARPPU by channelEasy · Product metrics
Medium Pandas questions
- Cart-to-order conversionMedium · Funnels and conversion
- Find the bugs in outlier cappingMedium · Code review
- Fill missing dates with zerosMedium · Dates and calendar
Hard Pandas questions
How to practice for your interview
- Start with an easy question and identify the index, columns and row grain of the result.
- Use medium questions to practice grouping, reshaping and time windows. Check whether a merge changes the number of rows.
- Attempt a hard question or a notebook to fix. Verify denominators, missing values and dates before trusting a metric.
Check more than the sample
Put your answer in result. Check column names, duplicates and missing values; for a rolling window, include a date with no orders in your own test case.
Read the shared data rules for dates, delivered orders and output conventions.