
Create a Data Dictionary Before Training Your First ModelData Science · INSIGHTA data dictionary explains what each field means, where it comes from, and how it may be used. Creating one before modelling exposes assumptions that are otherwise easy to hide inside code. Start with a small fictional dataset rather than private customer records.
Describe the unit of observation
Imagine a dataset of library visits. Does each row represent a person, a visit, or a borrowed item? The answer changes how counts should be interpreted. A reader with three loans may appear once in a person table and three times in a loan table.
Write the row definition at the top of your dictionary. For each column, record the name, meaning, expected type, permitted values, missing-value convention, and source. Distinguish a genuine zero from an unknown number.
Record when information becomes available
If the goal is to estimate a visit’s duration at arrival, the eventual checkout time cannot be an input. Add an “available at prediction time” column. This simple question catches features that would make a practice model look better than it could perform in use.
Check definitions with examples
Create three sample rows and explain each in ordinary language. If “member_status” can mean both membership eligibility and current borrowing activity, rename or split it. Define whether dates use local time and whether identifiers are unique.
Make the dictionary useful to someone else
Give a second reader the dataset and dictionary without your notebook. Ask them to calculate the number of visits and identify invalid records. Note where they need clarification and revise those definitions.
The portfolio deliverable is a data dictionary, a small validation report, and a list of unresolved questions. It demonstrates that you understand the data before selecting an algorithm.
Created with AI assistance for JobJet. Illustrative exercises use fictional data; no employer outcomes are promised.