(Re-)order the categories of a categorical column.
category
) column,
even if the input was an unordered category
or not a Category
at all. I.e. it is supposed
that re-ordering the categories means the order is important.
If the input column is already a category
:
category
:
force_categorical
is true
, and ordered as desired. Otherwise the new column will be identical to the input (no ordering performed).Examples
ds.first_name
), datasets (ds
or ds[["first_name", "last_name"]]
) or models (referenced
by name e.g. "churn-clf"
).
Inputs
category
).Outputs
step(..., {"param": "value", ...}) -> (output)
.
Parameters
null
, the unique and lexicographically sorted existing values in the input column will be used.Array items
category
before ordering (otherwise will be unchanged).