Data Engineering · Python · Data Quality

Find the data problems before they enter a report.

A spreadsheet can look complete while hiding repeated identifiers, missing fields or inconsistent dates. This independent Python mini-project demonstrates how to identify common CSV quality issues without changing the source data.

Scope: a read-only portfolio demonstration using invented customer records. It is not a client engagement or a claim about real customer data.

What gets checked

Keys and missing values

Compare nonempty record keys after trimming and case-folding, and flag blanks in explicitly required columns.

Formats and structure

Check strict calendar dates, basic email syntax, inconsistent CSV field counts and unnecessary surrounding spaces.

Evidence without disclosure

Produce a deterministic JSON report of aggregate findings. No original row values appear in the report, and nothing is silently corrected.

One fictional example, with known defects

The demonstration file contains six deliberately invented CSV rows. Five have the expected number of fields; one has an extra field. Among the five structurally valid rows, the audit is expected to detect a duplicate identifier, a missing identifier, a missing email, one invalid email shape, an impossible calendar date and outer whitespace.

6Fictional rows read
1Duplicate key observation
1Invalid date observation
8Overlapping issue observations

The figures describe fixed expectations from a synthetic fixture, not live business measurements. Multiple checks may flag the same record; eight observations do not mean eight different defective rows.

From a messy export to a reviewable decision

  1. Define the contract. Identify the actual key, required columns, relevant date rules and permissible file scope.
  2. Run read-only validation. Record aggregate inconsistencies without deleting rows, filling blanks or overwriting the input file.
  3. Review causes before changing data. Confirm which issues are genuine mistakes and which are legitimate business exceptions.
  4. Document remediation. Only apply explicitly approved corrections, then rerun the checks and preserve a change log.

This is an example of how a small data-quality review can be structured. The last two steps describe a possible follow-up process, not remediation completed on a real client dataset.

What this does not establish

Passing a syntactic check is not proof that an email address exists, that a date reflects a real event, or that a business identifier is correct. The mini-project does not join multiple files, assess legal compliance, handle every national data format or provide automatic repairs. Source authorization and appropriate handling of sensitive data must be agreed before any real engagement.

Inspect the method, or discuss a specific problem

The example, Python source, synthetic CSV and regression tests are available for technical review. For an actual data-quality task, the first step is agreeing on the dataset, scope and expected deliverable—not sending private customer files unsolicited.