Skip to main content

ColSchema

Column schema: the names and dtypes a step reports for a column set.

Usage

Source

ColSchema(
    columns=None,
    dtypes=None,
)

Carries the column names and their dtype names: enough for a step to describe what it consumed (schema_in) and produced (schema_out). This is the lightweight step-facing report; the recipe-side column-lineage DAG that tracks roles, source, sparsity, and provenance is Lineage. Not to be confused with SchemaInfo (what a step is handed at fit time) or Schema (the snapshot of the training data that transform() validates new data against).

Examples

schema = ColSchema(columns=["age", "city"], dtypes={"age": "Int64", "city": "String"})
schema.columns, schema.dtypes
(['age', 'city'], {'age': 'Int64', 'city': 'String'})