## SchemaInfo


Schema-derived context handed to [Step.fit()](Step.fit.md#mlfeatures.Step.fit).


Usage

``` python
SchemaInfo(
    columns=None, dtypes=None, roles=None, lineage=None, producing_steps=None
)
```


Carries the current column names, their dtype names, and the live [Roles](Roles.md#mlfeatures.Roles). In practice a step reads only `roles` (for selector resolution). The recipe-side column-lineage DAG ([mlfeatures.lineage.Lineage](Lineage.md#mlfeatures.Lineage)) is maintained separately by the recipe and is not handed to steps for their own logic; `lineage` and `producing_steps` are populated by the recipe purely so provenance selectors ([has_source](Selectors.md#mlfeatures.Selectors.has_source) / [has_ancestor](Selectors.md#mlfeatures.Selectors.has_ancestor)) can resolve against the DAG at fit time. Both are `None` outside a recipe fit. Not to be confused with [ColSchema](ColSchema.md#mlfeatures.ColSchema) (what a step reports back) or [Schema](Schema.md#mlfeatures.Schema) (the snapshot of the training data used for boundary checks).


## Examples

Build a snapshot from a data frame with `from_frame`; steps read `columns`, `dtypes`, and `roles` off it during [fit()](Step.fit.md#mlfeatures.Step.fit):


``` python
frame = _frame.from_native(pd.DataFrame({"x": [1, 2], "y": ["a", "b"]}))
info = SchemaInfo.from_frame(frame)
info.columns, info.dtypes
```


    (['x', 'y'], {'x': 'Int64', 'y': 'String'})
