Most teams treat data cleaning as a phase: collect everything, then fix it before analysis. That framing quietly guarantees problems, because by the time you are "cleaning", the context that would let you fix issues correctly is already gone.
The cost moves earlier than you think
A duplicate record caught at the source costs a quick fix. The same duplicate caught after loading costs a judgement call — keep it, drop it, or re-pull? And a duplicate caught after analysis costs your credibility.
The lesson from building reporting pipelines is simple: quality problems are process problems first. The fix lives upstream.
Design the rules before you collect
Before a single row lands, write down what a valid record looks like:
- Which fields are required, and under what logic.
- What completion time is implausibly fast.
- What counts as a duplicate across identifiers.
- Which test records must never reach the dataset.
These rules become monitoring during collection, not archaeology afterwards.
Make every exclusion explainable
A clean dataset is not one with no removals — it is one where every removal has a reason you could defend to a stakeholder. Keep an exclusion log. It turns quality from an opinion into a record.
Do this, and "data cleaning" stops being a dreaded phase. It becomes a property of how you designed the work.