Unpack list¶
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.
Usage¶
The following are the step's expected inputs and outputs and their specific types.
unpack_list(lists: list, {"param": value}) -> (list_items: dataset)
where the object {"param": value}
is optional in most cases and if present may contain any of the parameters described in the
corresponding section below.
Inputs¶
lists: column:list
An input column containing lists to unpack.
Outputs¶
list_items: dataset
The output dataset containing list elements in individual columns.
Parameters¶
start: integer = 0
List index of first element to extract.
Range: 0 ≤ start < inf
n_items: integer = 1
Total number of consecutive items to extract from lists.
Range: 1 ≤ n_items < inf
prefix: string | null
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.
column_names: array[string]
A list of names for the columns in the output dataset. Will be used only if the number of names passed matches the n_items
parameter.
Items in column_names
item: string
The name of a single column in the ouput.