The most beautiful chart in the world is worthless if it's built on dirty data. Data cleaning — also called data wrangling or preprocessing — is the unglamorous but absolutely essential step that separates professional visualizations from misleading ones. Industry surveys consistently report that data scientists spend 60–80% of their time on cleaning rather than analysis.
Common data quality issues include missing values, duplicate records, inconsistent formatting, and outliers. Missing values are the most frequent problem: a survey respondent skips a question, a sensor fails to record a reading, or a database join produces NULLs. Simple strategies like dropping incomplete rows, filling with the mean or median, or using forward-fill for time series can address most cases, but each approach introduces bias that must be understood and documented.
Format inconsistencies are particularly insidious because they don't trigger errors — they just silently corrupt your analysis. Dates stored as strings in mixed formats (MM/DD/YYYY vs DD/MM/YYYY), numeric values with currency symbols or commas, and categorical values with inconsistent capitalization or trailing whitespace all need normalization. Automated discovery tools that profile your data — reporting value distributions, null counts, and type mismatches — can accelerate this process dramatically.
Always visualize your data before and after cleaning. Histograms reveal skewed distributions that might need transformation; scatter plots expose outlier clusters; and quick summary statistics confirm that cleaning operations produced the expected results. Data cleaning isn't a one-time task — it's an iterative dialogue between you and your data.