## Mode


Shape of a step's input/output relationship.


Usage

``` python
Mode
```


Every concrete step class declares one `mode`. The framework reads it for two things: how the step's columns are recorded in the column lineage, and whether [keep_original_cols](Step.keep_original_cols.md#mlfeatures.Step.keep_original_cols) is fixed or configurable (see [KeepOriginals](KeepOriginals.md#mlfeatures.KeepOriginals)).

The members, with the value [keep_original_cols](Step.keep_original_cols.md#mlfeatures.Step.keep_original_cols) takes for each:

- `ONE_TO_ONE`: each input column produces exactly one output column, e.g. [StepNormalize](StepNormalize.md#mlfeatures.StepNormalize). Fixed at `False`.
- `ONE_TO_MANY`: each input column produces one or more output columns, e.g. [StepDummy](StepDummy.md#mlfeatures.StepDummy). Configurable, default `False`.
- `MANY_TO_MANY`: a set of input columns produces a new set of output columns, e.g. [StepPca](StepPca.md#mlfeatures.StepPca). Configurable, default `False`.
- `REMOVING`: input columns are dropped and none are created, e.g. [StepDropZeroVariance](StepDropZeroVariance.md#mlfeatures.StepDropZeroVariance). Fixed at `False`.
- `ADDING`: new columns appear with no corresponding input, e.g. [StepIntercept](StepIntercept.md#mlfeatures.StepIntercept). Fixed at `True`.
- `ROW_OP`: no change to the columns, e.g. [StepFilter](StepFilter.md#mlfeatures.StepFilter). Fixed at `True`. Row steps only act while the recipe is fitted and are skipped by [transform()](Step.transform.md#mlfeatures.Step.transform) on new data.
- `UNCONSTRAINED`: the relationship cannot be declared in advance, e.g. [StepMutate](StepMutate.md#mlfeatures.StepMutate). Fixed at `True`.


## Examples

Each step class declares its mode; for example [StepDummy](StepDummy.md#mlfeatures.StepDummy) expands one column into many:


``` python
StepDummy.mode, [m.value for m in Mode]
```


    (<Mode.ONE_TO_MANY: 'one_to_many'>,
     ['one_to_one',
      'one_to_many',
      'many_to_many',
      'removing',
      'adding',
      'row_op',
      'unconstrained'])
