edf.profile()

Inspect the structural metadata of a dataset.

Signature
edf.profile(dataset) -> DatasetProfile

Inspect 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

NameTypeDefaultDescription
datasetstr | pathlib.Path | pandas.DataFrameA pandas DataFrame or path to a supported CSV or Excel dataset.

Returns

DatasetProfileStructural metadata in file_name, file_type, rows, columns, column_names, data_types and memory_usage_bytes.

Raises

  • FileNotFoundErrorthe supplied path does not exist.
  • ValueErrorthe supplied file type is not supported.

Examples

Profile a dataset

profile_example.py
import eazydatafix as edf

profile = edf.profile("hospital.csv")
print(profile.rows, profile.columns)
print(profile.column_names)
print(profile.data_types)
Python 3.11Expected 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.

See Also