Before you start
- Python 3.10 or later with pandas installed (pip install pandas)
- The brief and the data files from the company
A take-home assignment is a small piece of real work: a brief, some data and a deadline. The people who set it are not mainly checking whether you know a library. They want to see how you read a request, whether you notice when data is wrong, and whether your answer can be trusted and understood. Treat it the way you would treat a request from a colleague.
Read the brief twice
On the first read, find the question. Write it at the top of your notes in one sentence: Which marketing channel brought the customers who spent the most in their first 90 days? On the second read, list what is fixed (the data, the time limit, the format of the answer) and what is left to you. Many weak submissions answer a more interesting question than the one asked. Answer the one asked first; mention the interesting one at the end.
Check the data before you trust it
Before any analysis, take a first look and write down what you find. A small function is enough:
import pandas as pd
orders = pd.DataFrame({
"order_id": [1001, 1002, 1002, 1003, 1004, 1005],
"customer": ["ana", "ben", "ben", "chen", None, "dee"],
"amount": [25.0, 40.0, 40.0, -5.0, 18.5, 1200.0],
"ordered_at": ["2026-03-01", "2026-03-01", "2026-03-01", "2026-03-02", "2026-03-02", "2026-03-03"],
})
def first_look(df: pd.DataFrame, key: str) -> None:
print(f"rows: {len(df)}, columns: {len(df.columns)}")
print(f"duplicate {key} values: {df[key].duplicated().sum()}")
missing = df.isna().sum()
print("missing values:", missing[missing > 0].to_dict())
amounts = df["amount"]
print(f"amount: min {amounts.min()}, median {amounts.median()}, max {amounts.max()}")
print(f"negative amounts: {(amounts < 0).sum()}")
first_look(orders, "order_id")
Run on this small sample, it prints:
rows: 6, columns: 4
duplicate order_id values: 1
missing values: {'customer': 1}
amount: min -5.0, median 32.5, max 1200.0
negative amounts: 1
Each line is a decision you have to make and explain. Is order 1002 a true duplicate or two items? Is a negative amount a refund? Is 1200 a real large order or a typing error? You often cannot know for sure; the reviewer wants to see that you noticed, made a sensible choice and said what it was.
Answer the question, then support it
Lead with the answer in plain words, then the evidence. A good shape for the write-up:
- The answer, in two or three sentences, with the main number.
- How you got there: the steps, briefly, in the order you took them.
- What you checked: totals that reconcile with the raw files, a sample you inspected by hand, a result that matches a simpler method.
- Assumptions and limits: what you assumed about the data and what the analysis cannot show.
- With more time: the next two things you would do.
One clear chart that supports the answer is worth more than ten that describe the data.
Hand in something that runs
The reviewer may open your work on a different machine, with little time. Make that easy:
- A README that starts with the answer and then says how to run the work in three commands or fewer.
- Pinned dependencies: a requirements file made inside a virtual environment, so the versions you used are the ones they get.
- Run it from scratch before you send it: a fresh environment, the raw files, top to bottom. A notebook that only works in the order you happened to run the cells is a common reason for a poor review.
- Relative paths, no secrets, and no copies of the data in the submission if the brief asks you not to share it.
Respect the time limit
If the brief gives a time, keep to it and say how long you spent. Scoping the work to the time you had is part of what is being judged. A finished, careful answer to the main question beats an ambitious one that is half done.
Expected result
A short written answer to the question in the brief, a notebook or script that reproduces it from the raw files on a clean machine, and a list of the assumptions and checks you made.
Frequently asked questions
How long should I spend?
As long as the brief says, and a little less. If it says three hours, plan for three, keep a note of the time, and say in your write-up what you would do with more. Spending a whole weekend rarely helps and can look like poor judgement about scope.
Should I use a machine learning model?
Only if the question needs one. Many briefs are answered better by a clear grouping, a chart and a careful comparison. A simple method you can explain beats a complex one you cannot.
Can I ask questions about the brief?
Yes, if the company gives a contact. A short, specific question about something truly ambiguous shows judgement. If you cannot ask, choose a reasonable reading, write it down as an assumption and move on.
What if I find a problem in their data?
Say so, plainly, with the evidence: how many rows, what you did about them and how it affects the answer. Finding and handling a data problem well is often what the assignment is really testing.
References
From Grokem: https://www.grokem.com/career/interview-preparation/take-home-data-assignment




