Where did those rows go?
There are two questions that can be asked about any analysis. The comfortable one is "what does the data say?" The one that actually gets asked — in the QBR, by the finance partner reconciling your July MRR against the billing system's July MRR — is "where did those rows go?" If you can't answer it row by row, it doesn't matter how good the chart is.
Run the code above. That's a shrunken but honest billing export, and it has every classic defect in seven rows: the retry that wrote S-02 twice, the row from June 29 that snuck into a July file, the internal test account someone created in 2023 and nobody dares delete, the blank mrr on a row that definitely billed something (or didn't — that's a decision, not a fact), and the blank plan the source system introduced mid-quarter. Seven rows in, and already the export disagrees with itself about how many customers it contains.
At real scale — 80,000 rows, five source systems — you will not eyeball this. You'll hand it to the AI, and the AI is genuinely good at drafting the cleaning: the documented pattern across practitioner surveys is exactly that split — AI drafts the SQL and the cleaning steps, humans validate on samples and own the interpretation. The part that goes wrong is never the drafting. It's that a drafted cleaning pass runs silently. Rows leave, values change, and no record exists of what left or why. Three weeks later finance says your MRR is $4,400 light, and the answer is somewhere in a notebook cell that no longer exists.
So this lesson installs the one rule that makes AI-assisted cleaning safe to use at all:
Every transform gets a receipt: rows in, rows out, and a named reason for every row dropped or changed. The original file is never touched.
Not "cleanup." Not "fixed dates." A receipt names what was wrong: dedupe on id — export writes one row per retry, -2. When the reconciliation question comes — and in this job it always comes — you read the log instead of re-running archaeology on your own notebook.
The next step turns that rule into a data structure. The rest of the lesson makes you catch the AI breaking it.