Unpack (extract) items from a column of lists into separate columns.
The first output column will contain the items in the first position of the input lists, the second column items in the second position etc.
The following shows how the step can be used in a recipe.
Examples
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.
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 input column containing lists to unpack.
Outputs
The output dataset containing list elements in individual columns.
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
List index of first element to extract.
Values must be in the following range:
Total number of consecutive items to extract from lists.
Values must be in the following range:
Prefix for names of generated columns.
By default, will use the output dataset’s name concatenated with “_0”, “_1” etc. for the first
extracted column, the second column etc. respectively. I.e. you name the output dataset of this step
list_items
, then its columns will be named “list_items_0”, “list_items_1” etc. If a prefix is provided,
this will be used instead of the output dataset’s name.
Unpack (extract) items from a column of lists into separate columns.
The first output column will contain the items in the first position of the input lists, the second column items in the second position etc.
The following shows how the step can be used in a recipe.
Examples
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.
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 input column containing lists to unpack.
Outputs
The output dataset containing list elements in individual columns.
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
List index of first element to extract.
Values must be in the following range:
Total number of consecutive items to extract from lists.
Values must be in the following range:
Prefix for names of generated columns.
By default, will use the output dataset’s name concatenated with “_0”, “_1” etc. for the first
extracted column, the second column etc. respectively. I.e. you name the output dataset of this step
list_items
, then its columns will be named “list_items_0”, “list_items_1” etc. If a prefix is provided,
this will be used instead of the output dataset’s name.