## Lineage.summary()


The lineage as a tidy data frame.


Usage

``` python
Lineage.summary(include_removed=False)
```


Columns `name`, `dtype`, `roles`, `source`, `sparse`: one row per live column, in data frame order. `dtype` is the dtype category (`"float"`, `"int"`, `"str"`, `"categorical_unordered"`, …) and `roles` is the sorted role set joined with `", "`.

The result is always a polars [DataFrame](DataFrame.md#mlfeatures.DataFrame), whatever backend the recipe was fitted on.

This is the same table [FittedRecipe.summary](FittedRecipe.summary.md#mlfeatures.FittedRecipe.summary) returns for the live columns. Reach for it when you also want the removed columns (`include_removed=True`) and which step dropped each; use [parents](Lineage.parents.md#mlfeatures.Lineage.parents) and [ancestors](Lineage.ancestors.md#mlfeatures.Lineage.ancestors) to trace a single column.


## Parameters


`include_removed: bool = ``False`  
If `True`, append a row for each removed column (in removal order) and add two columns: [parents](Lineage.parents.md#mlfeatures.Lineage.parents), the immediate parent columns joined with `", "`, and `removed_by`, the id of the step that dropped the column (null for live columns). Default `False`.


## Examples

One row per live column, mixing the normalized numerics (source `"original"`, now [float](Selectors.md#mlfeatures.Selectors.float)) with the dummy indicators (source `"dummy"`):


``` python
lineage.summary()
```


shape: (23, 5)

| name            | dtype   | roles     | source     | sparse |
|-----------------|---------|-----------|------------|--------|
| str             | str     | str       | str        | bool   |
| "Status"        | "str"   | "target"  | "original" | false  |
| "Seniority"     | "float" | "feature" | "original" | false  |
| "Time"          | "float" | "feature" | "original" | false  |
| "Age"           | "float" | "feature" | "original" | false  |
| "Expenses"      | "float" | "feature" | "original" | false  |
| …               | …       | …         | …          | …      |
| "Marital_widow" | "float" | "feature" | "dummy"    | false  |
| "Records_yes"   | "int"   | "feature" | "dummy"    | false  |
| "Job_freelance" | "float" | "feature" | "dummy"    | false  |
| "Job_others"    | "float" | "feature" | "dummy"    | false  |
| "Job_partime"   | "float" | "feature" | "dummy"    | false  |


With `include_removed=True` the dropped categoricals appear too, along with each column's parents:


``` python
lineage.summary(include_removed=True)
```


shape: (27, 7)

| name          | dtype   | roles     | source     | sparse | parents | removed_by |
|---------------|---------|-----------|------------|--------|---------|------------|
| str           | str     | str       | str        | bool   | str     | str        |
| "Status"      | "str"   | "target"  | "original" | false  | ""      | null       |
| "Seniority"   | "float" | "feature" | "original" | false  | ""      | null       |
| "Time"        | "float" | "feature" | "original" | false  | ""      | null       |
| "Age"         | "float" | "feature" | "original" | false  | ""      | null       |
| "Expenses"    | "float" | "feature" | "original" | false  | ""      | null       |
| …             | …       | …         | …          | …      | …       | …          |
| "Job_partime" | "float" | "feature" | "dummy"    | false  | "Job"   | null       |
| "Home"        | "str"   | "feature" | "original" | false  | ""      | "dummy"    |
| "Marital"     | "str"   | "feature" | "original" | false  | ""      | "dummy"    |
| "Records"     | "str"   | "feature" | "original" | false  | ""      | "dummy"    |
| "Job"         | "str"   | "feature" | "original" | false  | ""      | "dummy"    |
