Skip to main content

Usage

The following example shows how the step can be used in a recipe.

Examples

  • Example 1
  • Signature
To force the language identifier of a dataset to be all Spanish:
make_constant(ds.lang, {"value": "es"}) -> (ds.lang_es)

Inputs & Outputs

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").
input
column
required
An arbitrary input column, used only to match its dimension (number of rows).
output
column
required
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.

Configuration

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

value
[string, number, array, array]
required
The value to fill the new column with. The data type of the output column depends on this value and the out_type parameter.
  • String
  • Number
  • String array
  • Number array
{_}
string
A single string.
out_type
string
required
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]
I