You receive a new dataset from a client. What steps do you take to clean it before analysis?
What the interviewer wants to hear
- Understand columns, grain and source first
- Check and handle missing values
- Remove or investigate duplicates
- Fix data types and inconsistent formats
- Look for outliers and impossible values
- Document every change
Model answer
First I understand the data: what one row represents, where it came from and what each column means. Then I profile it: row counts, missing values per column, distinct values and min and max. I check for duplicates on the key that should be unique and find out why they exist before deleting anything. I fix data types, such as dates stored as text or numbers with commas, and standardise formats like city names written in different ways. I look for outliers and impossible values, like negative ages or future order dates, and decide with the business whether they are errors. For missing values I choose based on context: drop, fill with median, or flag them. Finally I document every step, ideally in a script or notebook, so the cleaning is repeatable and someone else can check it.
Can you answer it under time pressure?
Take a timed easy round and get scored on every answer.
More easy Data Analyst questions
- Explain the difference between INNER JOIN, LEFT JOIN and FULL OUTER JOIN with a simple example.
- When would you use the median instead of the mean? Give a business example.
- How do you decide which chart to use for a piece of data?
- How would you explain a data finding to a manager who is not technical?
- Walk me through one analysis you did from start to finish.
- How do you check that the numbers from your SQL query are correct before you share them?
- What is the difference between VLOOKUP and XLOOKUP, and which do you prefer?
- What is the difference between a metric and a KPI? Give an example.
- You find duplicate customer records in a dataset. How do you handle them?