Profile.to_spec¶
to_spec ¶
to_spec(*, base_dir: str | Path | None = None) -> dict
Serializable recomputable specification for a parquet profile.
Only file-backed profiles are reproducible from JSON alone; an in-memory DataFrame or an arbitrary LazyFrame must be regenerated by Python code. Resolved columns and metadata are saved (not polars selector objects). The spec does not contain observations or cached summary results.
Example¶
p = ps.profile('cohort.parquet')
recipe = p.to_spec()