Creates a new constant column (with a single unique value) of the same length as the input column.
The following example shows how the step can be used in a recipe.
Examples
To force the language identifier of a dataset to be all Spanish:
To force the language identifier of a dataset to be all Spanish:
General syntax for using the step in a recipe. Shows the inputs and outputs the step is expected to receive and will produce respectively. For futher details see sections below.
The following are the inputs expected by the step and the outputs it produces. These are generally
columns (ds.first_name
), datasets (ds
or ds[["first_name", "last_name"]]
) or models (referenced
by name e.g. "churn-clf"
).
Inputs
An arbitrary input column, used only to match its dimension (number of rows).
Outputs
Column filled with copies of the value specified in parameters. The data type of the output column will be the one specified by out_type.
The following parameters can be used to configure the behaviour of the step by including them in
a json object as the last “input” to the step, i.e. step(..., {"param": "value", ...}) -> (output)
.
Parameters
The value to fill the new column with.
The data type of the output column depends on this value and the out_type
parameter.
Select types using their name.
Values must be one of the following:
category
date
number
boolean
url
sex
text
list[number]
list[category]
list[url]
list[boolean]
list[date]
Creates a new constant column (with a single unique value) of the same length as the input column.
The following example shows how the step can be used in a recipe.
Examples
To force the language identifier of a dataset to be all Spanish:
To force the language identifier of a dataset to be all Spanish:
General syntax for using the step in a recipe. Shows the inputs and outputs the step is expected to receive and will produce respectively. For futher details see sections below.
The following are the inputs expected by the step and the outputs it produces. These are generally
columns (ds.first_name
), datasets (ds
or ds[["first_name", "last_name"]]
) or models (referenced
by name e.g. "churn-clf"
).
Inputs
An arbitrary input column, used only to match its dimension (number of rows).
Outputs
Column filled with copies of the value specified in parameters. The data type of the output column will be the one specified by out_type.
The following parameters can be used to configure the behaviour of the step by including them in
a json object as the last “input” to the step, i.e. step(..., {"param": "value", ...}) -> (output)
.
Parameters
The value to fill the new column with.
The data type of the output column depends on this value and the out_type
parameter.
Select types using their name.
Values must be one of the following:
category
date
number
boolean
url
sex
text
list[number]
list[category]
list[url]
list[boolean]
list[date]