edf.assess()
Compute a full data-quality assessment for a dataset.
Signature
edf.assess(data, *, columns=None, thresholds=None, verbose=False) -> QualityReportCompute 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
| Name | Type | Default | Description |
|---|---|---|---|
| data | str | pathlib.Path | pandas.DataFrame | — | Source dataset. Strings ending in .csv, .xlsx or .xls are loaded automatically. |
| columns | list[str] | None | None | Restrict the assessment to a subset of columns. When None, every column is scanned. |
| thresholds | dict | None | None | Override default warning thresholds, e.g. {'missing': 0.2, 'duplicates': 0.05}. |
| verbose | bool | False | Print a per-column log while assessing. |
Returns
QualityReport — Structured report with summary metrics and per-column diagnostics.
Raises
FileNotFoundError— the supplied path does not exist.ValueError— the file extension is not supported or the DataFrame is empty.
Examples
Assess a CSV file
assess_example.py
python
import eazydatafix as edf
report = edf.assess("employees.csv")
report.summary()Python 3.11— Expected 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.0Custom thresholds
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.