edf.profile()
Inspect the structural metadata of a dataset.
Signature
edf.profile(dataset) -> DatasetProfileInspect the structural metadata of a dataset.
Description
Returns a lightweight structural profile: file name and type, row and column counts, column names, pandas data types and memory use. It intentionally does not perform quality assessment or calculate distributions and correlations.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| dataset | str | pathlib.Path | pandas.DataFrame | — | A pandas DataFrame or path to a supported CSV or Excel dataset. |
Returns
DatasetProfile — Structural metadata in file_name, file_type, rows, columns, column_names, data_types and memory_usage_bytes.
Raises
FileNotFoundError— the supplied path does not exist.ValueError— the supplied file type is not supported.
Examples
Profile a dataset
profile_example.py
python
import eazydatafix as edf
profile = edf.profile("hospital.csv")
print(profile.rows, profile.columns)
print(profile.column_names)
print(profile.data_types)Python 3.11— Expected output
>>> profile = edf.profile("hospital.csv")>>> profile.rows, profile.columns(15, 8)>>> profile.column_names[:3]['patient_id', 'age', 'gender']Notes
- profile() is a structural inventory, not a data-quality report.
- Use assess() for missing values, duplicates, quality dimensions and report exports.
Best Practices
- Run profile() first when you need a quick shape and schema check.
- Pair profile() with assess() when you also need quality metrics.