Stop 14 · Build Your Data Analyst PortfolioProjects · 6/7

Python + Pandas Analysis Notebook

Part of the Data Analyst Roadmap

In short

A clean, well-explained notebook is like a lab record that recruiters can actually run. It shows you can code, think and explain in one place.

A polished, well-commented Jupyter notebook showcasing your Python and Pandas fluency on a dataset distinct from your other portfolio pieces, to show range.

The jaadu in a lab coat writes in a spiral notebook at a bench with beakers and test tubes.

Think of it like this

The chemistry lab record

In the college lab, your record book has aim, apparatus, procedure, observations and result, in that order. Anyone can repeat your experiment from it. A good analysis notebook follows the same pattern, with code and charts instead of beakers.

Watch it happen

A notebook that reads like a lab record

Aim
Load
Clean
Analyse
Result

1/5A markdown cell at the top: the question, the dataset and what you expect to find.

The big ideas

What you need to know

Markdown is half the notebook

Explain what each cell does and why. A notebook with only code is hard for anyone else to follow.

Restart and run all

Before sharing, restart the kernel and run every cell top to bottom. If it breaks, fix the order.

Learn groupby well

groupby with named aggregations answers most business questions in one readable block.

Share it properly

Put it on GitHub or Kaggle with a short README, so it renders and anyone can view it.

See it in code

Walk through the code

python
1import pandas as pd2 3df = pd.read_csv("orders.csv", parse_dates=["order_date"])4df["month"] = df["order_date"].dt.to_period("M")5 6summary = (df.groupby(["month", "category"])7             .agg(orders=("order_id", "nunique"),8                  revenue=("amount", "sum"))9             .reset_index())10 11top = summary.sort_values("revenue", ascending=False).head(10)12top

1/3Parse dates while loading, then add a month column to group by.

The core of many analysis notebooks: load, add a month column, group and aggregate with clear names.

Save yourself the pain

Common mistakes

Oops

Cells that only work if run in a weird order you remember but nobody else does.

Do this instead

Restart and run all before every share. Keep cells in the order they should run.

Oops

Leaving dozens of unexplained print(df.head()) cells everywhere.

Do this instead

Keep the checks that matter and delete the rest. Add a markdown line where a check revealed something.

Your mission

First milestone: a clean skeleton

~35 min

Quick check

What does .agg(orders=("order_id", "nunique")) do inside a groupby?

Go deeper

  1. 1Pick a dataset and question different from your other portfolio projects.
  2. 2Use markdown cells throughout so the notebook reads clearly without running the code.
  3. 3Push it to GitHub with a clear README explaining the question and key findings.

More projects at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge