parq_blockmodel.schema.utils.load_schema#
- parq_blockmodel.schema.utils.load_schema(schema)[source]#
Load and return a pandera DataFrameSchema.
Accepts either a ready-made DataFrameSchema object or a Path pointing to a YAML schema file (loaded via df_eval.utils.pandera_io_compat.from_yaml to preserve custom metadata).
- Parameters:
schema (DataFrameSchema or Path) – A pandera DataFrameSchema instance, or a Path to a YAML schema file.
- Returns:
The loaded schema.
- Return type:
DataFrameSchema
- Raises:
ImportError – If pandera or df-eval is not installed.
TypeError – If schema is not a recognised type.