Coding challenges
Python pandas interview questions
Analyst interviews and take-home tasks often ask you to clean and summarise data with pandas. Each question gives you DataFrames and asks for a function that returns the right table. It runs in Python in your browser, and hidden tests check the awkward cases.
Your code runs in Python on your own device (pandas loads the first time you run it). Nothing is sent to us.
A new one every day
Today’s challenge
The pandas
pandas is the tool most analyst teams use for work that’s awkward in SQL: tidying messy columns, reshaping and quick analysis. Interviewers look for the same habits as in SQL, plus pandas-specific ones: filtering with clear conditions, merging on the right keys, and keeping the result as a tidy table.
Still working out the route in? Read how to become a graduate data analyst on Deeplink Coaching.
- Claim amounts in bands Binning, Grouping · data analyst
- Each claim’s share of its region Grouping, Percentages · data analyst
- Match rent payments to stalls Merging, Data quality · data analyst and data engineer
- Month-end balances by product Reshaping, Grouping, Dates · data analyst
- Monthly online revenue Filtering, Merging, Group by, Dates · data analyst
- Net card takings by stall Cleaning, Grouping · data analyst
- Claim references from emails Cleaning, Data quality · data analyst and data engineer
- Clinic outcomes and DNA rates Reshaping, Grouping, Percentages · data analyst
- Fix a merge that double counts Debugging, Merging, Data quality · data analyst and data engineer
- Fix the attendances summary Debugging, Grouping, Dates, Data quality · data analyst and data engineer
- Grants by financial year Dates, Grouping, Cleaning · data analyst
- Latest status of each claim Deduplication, Ranking and ties, Data quality · data analyst and data engineer
- Library visits month on month Grouping, Dates, Percentages, Merging · data analyst
- Weekly sales from till exports Cleaning, Dates, Reshaping, Grouping · data analyst
- Average daily savings balance Dates, Reshaping, Grouping, Data quality · data analyst and data engineer
- Rate in force for each deposit Merging, Dates, History tables · data analyst and data engineer
- Seven-day average takings Rolling windows, Dates, Grouping, Reshaping · data analyst
Want a day-by-day route through them? Follow the two-week Python and pandas plan
Interview guides
Read
Explaining your code out loud is half of a technical interview. These guides show how.
Getting ready for a data role? Deeplink Coaching offers data career coaching for graduates applying for data analyst and data engineer jobs.