recipe = (
Recipe(data=credit, target="Status")
.add(StepNormalize(s.numeric_features()))
.add(StepDummy(s.nominal_features()))
)Recipe.summary()
The input columns, before any step runs, as a tidy data frame.
Usage
Recipe.summary()One row per column, with its name, dtype, roles (a column with several roles lists them all in one cell), source (always "original" before fitting) and whether it is sparse. Requires data: construct the recipe with Recipe(data=...), or fit it and use FittedRecipe.summary() for the columns the recipe produces.
Use it to check that the roles you assigned landed on the columns you meant before fitting; it cannot show what the steps will add or remove. Role operations written before the first step are reflected; later ones take effect at fit time and appear in FittedRecipe.summary().
Raises
ValueError- If the recipe was constructed without data.
Examples
The pre-fit summary describes the input columns and their roles before any step has run, so Home is still a single str column with source "original":
recipe.summary()| name | dtype | roles | source | sparse |
|---|---|---|---|---|
| str | str | str | str | bool |
| "Status" | "str" | "target" | "original" | false |
| "Seniority" | "int" | "" | "original" | false |
| "Home" | "str" | "" | "original" | false |
| "Time" | "int" | "" | "original" | false |
| "Age" | "int" | "" | "original" | false |
| … | … | … | … | … |
| "Income" | "int" | "" | "original" | false |
| "Assets" | "int" | "" | "original" | false |
| "Debt" | "int" | "" | "original" | false |
| "Amount" | "int" | "" | "original" | false |
| "Price" | "int" | "" | "original" | false |