A note-taking system for a data course: snippets, errors, decisions
In this article (7 sections)
Related programme: the Data Science course (6 months; ₹1,30,000 (inclusive of GST) · EMI from ₹5,000/month).
For a data course, keep three working files instead of lecture notes: a snippet library of code you'll reuse, an error log of every error you've solved, and a decision log recording why you made each analysis choice. Write in plain text or Markdown, with one heading per entry, so a short script can search all three. You'll use these files every week. Lecture notes you won't open again, because the recording and slides already hold that material.
Why lecture-style notes fail here
In a history class, notes capture information you'd otherwise lose. In a data course, the information is already stored: in the recording, the slides, the official documentation. Copying it down uses up the attention you need for following the reasoning. What you actually lose if you don't write it down is different: the exact syntax that finally worked, the fix for an error that cost you an hour, and the reason you chose one approach over another. The three files are built to catch those.
File one: the snippet library
Each entry is a heading that names the task, not the function, followed by the smallest working code. You'll search for "count distinct customers per city", not for nunique.
## pandas: count distinct per group
df.groupby('city')['customer_id'].nunique()
Source: class 7, 2026-08-23. Works on pandas 2.x.
## sql: running total by date
SUM(amount) OVER (ORDER BY order_date)
Note: add PARTITION BY customer_id for per-customer totals.Rules for this file:
- Only add a snippet after you've run it yourself. Code you've only seen someone else run doesn't go in.
- Keep each one under five lines. Anything longer belongs in a proper script in your project folder.
- Record the date and source, so you can find the lecture segment again if you need the explanation.
File two: the error log
This is the most valuable file, and the one most learners never start. Every time an error takes you more than ten minutes, write an entry:
## KeyError: 'City'
Doing: selecting a column after reading a CSV export
Cause: column is 'city' in lower case; I typed 'City'
Fix: df.columns = df.columns.str.lower() right after read_csv
Time lost: 25 minThree things happen when you keep this log. You stop losing time to the same error twice. When you ask a mentor about an error, you can show what you already tried. And after a couple of months you can see your patterns. Many learners find their errors cluster in a few categories, like column names, data types or join keys. Knowing your own list is useful in a take-home test.
File three: the decision log
Every analysis involves choices that aren't in any tutorial: drop or fill missing values, which date defines a month, whether an outlier is an error or a real large order. Write each choice down when you make it:
## Dropped 14 rows with no order date
Project: returns analysis
Options considered: drop; impute from dispatch date; keep as "unknown month"
Chose: drop. Reason: cannot place them in a month; 0.3% of rows; checked they are not
concentrated in one category.
Revisit if: the missing share rises above 2% in the next extract.This file becomes your interview preparation. When an interviewer asks "Why did you drop those rows?", you won't be reconstructing a reason from memory. You'll remember the one you wrote down at the time, including the options you rejected. That's much more convincing.
Search all three in one command
Keep the three files in one folder, called notes/ for example, and use a small search script. This version creates a synthetic folder so it can run anywhere. Point search at your own folder when you use it.
import pathlib
import tempfile
# Build a tiny synthetic notes folder so the search can be tested.
notes = {
"snippets.md": "## pandas: count distinct per group\ndf.groupby('city')['customer_id'].nunique()\n"
"## sql: running total\nSUM(amount) OVER (ORDER BY order_date)\n",
"errors.md": "## KeyError: 'City'\nCause: column is 'city' lower case. Fix: df.columns = df.columns.str.lower()\n",
"decisions.md": "## Dropped 14 rows with no order date\nReason: cannot place them in a month; 0.3% of rows.\n",
}
def search(folder, term):
hits = []
for path in sorted(pathlib.Path(folder).glob("*.md")):
heading = None
for line in path.read_text(encoding="utf-8").splitlines():
if line.startswith("## "):
heading = line[3:]
if term.lower() in line.lower():
hits.append((path.name, heading))
return sorted(set(hits))
with tempfile.TemporaryDirectory() as d:
for name, text in notes.items():
pathlib.Path(d, name).write_text(text, encoding="utf-8")
result = search(d, "city")
for h in result:
print(h)
assert ("errors.md", "KeyError: 'City'") in result
assert ("snippets.md", "pandas: count distinct per group") in resultSearching for "city" returns the heading of every entry that mentions it, across all three files. Because entries are separated by headings, a result points you straight to the entry you need rather than dropping you somewhere in a long page.
During a live class
Keep only a scratch file open during the session and write in it just two kinds of line: a timestamp next to anything you want to rewatch ("41:10 why LEFT not INNER here"), and questions to ask. Within 24 hours, move anything worth keeping into the three files and delete the scratch file. The timestamps also make the recording far more useful. How to use class recordings well shows how to turn them into a short rewatch list.
Weekly five-minute review
On Sunday, read the week's error-log entries and count them by category. If one category keeps growing, that's your next practice topic. Read the decision log for your current project too, and check each "Revisit if" condition.
The Data Science programme runs live online, with optional in-person labs at our Noida centre, and its sessions are recorded, so timestamped notes pay off over its six months. If you keep asking the same questions in class, how to ask a good doubt pairs well with the error log.
Pankit Kumar has 10 years in Data Science & AI, building and shipping production systems in regulated pharma and clinical environments. He is a freelance trainer at Boston Institute of Analytics, AnalytixLabs and Scaler, and has taught this material to thousands of working professionals.
This article is part of our Data Science programme — 6 months. From data foundations to machine learning, deep learning and deployment.
Explore Data Science