edfEazyDataFix

edf.assess()

Compute a full data-quality assessment for a dataset.

Signature
edf.assess(data, *, columns=None, thresholds=None, verbose=False) -> QualityReport

Compute a full data-quality assessment for a dataset.

Description

Computes missing values, duplicates, dtype consistency, cardinality, outliers and a composite quality score for the supplied dataset. Accepts CSV paths, Excel workbooks and pandas DataFrames. The returned QualityReport is a serialisable object with .summary(), .to_dict() and .to_html() methods.

Parameters

NameTypeDefaultDescription
datastr | pathlib.Path | pandas.DataFrameSource dataset. Strings ending in .csv, .xlsx or .xls are loaded automatically.
columnslist[str] | NoneNoneRestrict the assessment to a subset of columns. When None, every column is scanned.
thresholdsdict | NoneNoneOverride default warning thresholds, e.g. {'missing': 0.2, 'duplicates': 0.05}.
verboseboolFalsePrint a per-column log while assessing.

Returns

QualityReportStructured report with summary metrics and per-column diagnostics.

Raises

  • FileNotFoundErrorthe supplied path does not exist.
  • ValueErrorthe file extension is not supported or the DataFrame is empty.

Examples

Assess a CSV file

assess_example.py
import eazydatafix as edf

report = edf.assess("employees.csv")
report.summary()
Python 3.11Expected output
>>> import eazydatafix as edf
>>> report = edf.assess("employees.csv")
>>> report.summary()
QualityReport(employees.csv)
rows 1,204
columns 12
missing_values 38 (0.3%)
duplicates 6 (0.5%)
quality_score 94.0

Custom thresholds

assess_example.py
report = edf.assess(
    "sales.xlsx",
    thresholds={"missing": 0.05, "duplicates": 0.01},
    verbose=True,
)

Notes

  • assess() never mutates its input; call fix() to obtain a cleaned copy.
  • For DataFrames larger than one million rows, use edf.profile() first to plan the assessment.

Best Practices

  • Run assess() before fix() so you can review issues and decide which fixes to allow.
  • Persist the returned report with report.to_dict() for reproducible pipelines.

See Also