Skip to content

Understanding Data Quality

Bad data quality leads to:

  • Wrong decisions
  • Broken dashboards
  • Unreliable ML models
  • Loss of trust

Data preprocessing is the discipline of making data usable and trustworthy.

Are required values missing?

  • df.isna().sum()
  • Missing percentage per column

Do values match reality?

  • Negative ages
  • Impossible dates (future DOB)
  • Wrong units (₹ vs paise)

Do values follow the same format across rows?

  • “delhi”, “Delhi”, ” DELHI ”
  • Mixed currencies

Do values fit the allowed set/range?

  • status should be one of: closed
  • rating must be 1–5

Are there duplicates?

  • Duplicate rows
  • Duplicate IDs
Quick quality checks
# shape
print(df.shape)
 
# schema
print(df.dtypes)
 
# missing
print(df.isna().sum().sort_values(ascending=False).head(20))
 
# duplicates
print("Duplicate rows:", df.duplicated().sum())
 
# basic stats
print(df.describe(include="all"))
  • Cleaned columns (trimmed text, fixed casing)
  • Correct dtypes (numeric/date)
  • Handled missing values
  • Outlier strategy selected (remove/cap/keep)
  • Encoded categories for modeling

Always document:

  • What you changed
  • Why you changed it
  • What assumptions you made

Think of data quality as a pipeline of checks. Raw data only becomes “trustworthy” once it has passed through each dimension below.

diagram Data quality workflow mermaid
Raw data passes through a series of checks before it can be trusted for analysis or modeling.

Once you know where the quality problems are, the next step is usually fixing dtypes — head to Outlier Detection (IQR Method) to start finding the extreme values hiding in your numbers.

pch.coffeeTagline

pch.coffeeCta

pch.feedbackHeading

pch.feedbackSubheading