Real business data is untidy. The same customer appears three times with different spellings, dates are written four ways, some prices include tax and some do not, and a third of the rows have a blank where the region should be. Data cleaning is the patient work of putting that right. It is rarely mentioned in AI sales pitches, yet it is often the largest single task in a forecasting, analytics or machine learning project, because a model trained or prompted on bad data produces bad answers with full confidence.
How it works
Cleaning usually follows a pattern:
- Profile. Look at what is actually there: value ranges, blank rates, formats, obvious outliers.
- Standardise. Put dates, currencies, phone numbers, units and category labels into one format.
- Deduplicate. Match records that refer to the same thing, which may need fuzzy matching on names and addresses.
- Handle gaps. Decide, field by field, whether to fill a missing value, flag it or drop the row.
- Validate. Apply business rules, such as order dates not being in the future or totals matching line items.
Tools range from spreadsheets and Python libraries such as pandas to SQL in a data warehouse. Language models now help with the fuzzier tasks: normalising free-text job titles, mapping messy product names to a catalogue, or splitting an address field into parts. Their output still needs checking, because a confident wrong mapping is worse than a blank.
For anything recurring, the cleaning rules should live in the data pipeline rather than being done by hand each time, so the same fixes are applied to new data automatically.
What it means for cost
Data cleaning is the most common reason AI and analytics projects take longer than quoted. The effort is hard to estimate until someone has looked at the data, which is why careful builders ask for a sample or propose a short discovery phase before fixing a price. Questions worth asking:
- Has the builder seen a sample of the real data, not a description of it?
- Which cleaning decisions need input from the business, such as which duplicate record wins?
- Will the cleaning be repeatable for new data, or a one-off?
A buyer who can supply clean, well-documented data will usually get a lower quote and a faster build.
Common questions
Can AI clean data automatically?
Partly. Models are good at standardising messy text and suggesting matches, and they speed up the work considerably. They also make plausible mistakes, so a sensible build has them propose changes, applies rules to check them, and sends uncertain cases to a person.
How long does data cleaning take?
It depends entirely on the state of the data and how many sources are involved. A single tidy export can be cleaned quickly; years of records from several systems with no shared IDs can take longer than the modelling itself. A short look at a real sample is the only reliable way to estimate it.