AI Data Basics
Before data can tell a useful story to an AI system, it needs a little editorial attention. Raw records arrive in all sorts of states: unevenly formatted, incomplete, duplicated, or carrying the residue of how they were collected. Cleaning and organizing data is the careful work of making those records easier to understand and use—without disguising what they contain or what they leave out.
Think of it less as a makeover than as good stewardship. Each correction, removal, and transformation should have a reason, a record, and a clear relationship to the task at hand. A tidy dataset may be easier to work with, but tidiness alone does not make it accurate, representative, or appropriate for every use.
Data cleaning can sound like housekeeping: sweep away the errors, straighten the columns, and carry on. In practice, it is closer to editing. An editor’s choices affect what a reader sees; data preparation choices affect what patterns a model can learn and what evidence a team later uses to judge it.
That influence has a long history. Before modern machine learning, censuses, scientific surveys, ledgers, and other large collections already depended on decisions about categories, missing entries, and consistent records. Today’s datasets may move faster and travel farther, but the central question remains familiar: how was this information made orderly, and what was lost or emphasized in the process?
At Databoxes.ai, we treat a dataset as more than a file. It is a set of choices in a container: where the information came from, how it was handled, and what it can reasonably support. Cleaning should make those choices clearer—not make them disappear.
There is no universal definition of “clean.” A value that looks unusual may be a genuine and important observation; a missing value may be meaningful; and a duplicated-looking record may describe a separate event. Before changing anything, write down what the dataset is meant to help answer and how it is expected to be used.
For example, a project estimating delivery times needs to know whether dates reflect the same time zone and whether records describe individual parcels or whole orders. A dataset intended to classify customer messages may need consistent text encoding and a clear account of how labels were assigned. The task determines which problems matter most.
A useful first question: If someone else made this change, could they explain why it was needed and show how to repeat it?
For a broader view of what “suitable” means, see Data Quality for AI. If you are still defining the source and intended population, begin with Collecting Data for AI.
Keep an unchanged copy of the source data before making edits. Work on a separate prepared version, and restrict access where the information is sensitive. An untouched original gives the team a point of comparison and a way to investigate later decisions.
Read the documentation, examine the fields, and look at a sample of records. Check column names, data types, date ranges, value distributions, and unexpected blanks. Note what each field is supposed to mean; a column called “status” is not self-explanatory if nobody has recorded which statuses are possible.
Inspection is also where a small anomaly can reveal a larger story: a sudden cluster of missing values may correspond to a change in a collection form, while inconsistent dates may point to different systems being combined.
Correct a value when there is reliable evidence for the correction, such as a documented unit mismatch or a known encoding problem. Do not silently guess at ambiguous values. When the right answer is unknown, preserve that uncertainty, flag the record, or consult the relevant data owner rather than creating false precision.
First determine whether a blank means “not recorded,” “not applicable,” “unknown,” or something else. These meanings are not interchangeable. Depending on the task, a team might leave a value missing, exclude particular records, or use a documented method to fill values in. Each approach has trade-offs and may affect which examples remain in the dataset.
Record how many values were missing, which fields were affected, and what action was taken. Never treat a convenient fill-in as though it were an observed fact.
Exact duplicate rows can inflate counts or give repeated examples extra influence. But two records that look alike are not necessarily duplicates: they may represent separate visits, transactions, or events from the same person. Decide what makes a record unique for this dataset, then document the rule used to identify and handle repeats.
When records are linked to people or events, deduplication can also have privacy implications. Review access and handling rules before combining or removing records.
Consistent formats make data easier to compare. Teams may standardize dates, units, capitalization, spelling variants, or category names. Keep a mapping of the original values and their standardized forms when those distinctions could matter.
A change from “NY,” “New York,” and “N.Y.” to one preferred label might be straightforward. Merging categories that sound similar but have distinct definitions is not. Standardization should clarify the data’s structure, not flatten meaningful differences.
Use clear field names, consistent types, and a predictable structure. Separate raw, intermediate, and prepared data so it is apparent which version is being used. Include a short readme or data dictionary that explains fields, units, allowed values, and known issues. A well-organized dataset should not require its creator to stand beside it and translate.
A transformation is any change made to the data: filtering records, changing a date format, correcting a value, removing duplicates, or creating a new field. Record these steps as they happen. A concise change log can note what changed, when, why, who approved it, and which dataset version was affected.
Where possible, use repeatable scripts or clearly specified procedures rather than one-off manual edits. Reproducible steps help another person check the work, recreate a prepared dataset, or understand why results differ between versions. They also make it easier to revisit a decision when the project’s requirements change.
For practical guidance on recording a dataset’s purpose, sources, and limitations, see Dataset Documentation Cards. To connect data changes with particular experiments, explore Dataset Versioning and Reproducibility.
Before sharing or using a prepared dataset, ask:
A “yes” to every question is not a guarantee that the data is right for every purpose. It is a sign that the team can describe what it has done—and where caution is still warranted.
Removing blanks, correcting obvious errors, and aligning formats can improve usability. They cannot, by themselves, repair a dataset that underrepresents certain communities, reflects historical inequities, or was collected for a different purpose. Nor can clean formatting establish that the team has permission to use the information.
Those questions call for separate, deliberate review. Consider who and what is represented, whose information may be involved, and whether the proposed use fits the data’s origin and permissions. Our guides to Bias and Representation in Data and Privacy and Data Rights offer a starting point.
Preparation is one part of responsible AI work, not a promise that every limitation has been resolved. The best-organized dataset is still a record of its origins, its omissions, and the decisions people made along the way.
Cleaning and organizing are most useful when they sit within a larger preparation process: define the task, understand the source, assess quality, make and document changes, then review the resulting data for its intended use.
Continue with Preparing Data for AI for an end-to-end workflow, or visit AI Data Foundations to revisit how data supports machine-learning systems.