Group Data
Function
This Step groups elements within a data list by index. Multiple input ports can be set to perform grouping operations with the same index list within each data list at the same time. If the index list is \[[0, 2], [1, 3, 4]] and the input data is [100, 20, 300, 40, 500], the output is \[[100, 300], [20, 40, 500 ]].
Parameter Description
Ports Settings
| Parameter | Description | ||
|---|---|---|---|
Port Number (1–15) |
Description: This parameter is used to specify the number of input and output ports of the Step. With each new port, you can connect multiple sets of data and perform group operations on multiple sets of data according to the same mapping index.
|
||
Operation Layer |
Description: This parameter is used to specify the operation hierarchy of the data received by each input port. When the Operation Layer is set to 0, the input data is a one-dimensional list, and operations will be performed on each element of the data list in groups. When the Operation Layer is set to 1, the input data is a two-dimensional list, and each sub-list in the data list will be grouped. Default value: 0 Instruction: This parameter is set according to the dimension of the input data. For example, if the index is [[0, 2]], [1, 3]] and the input data is [[10, 20, 30,]] 40, [50, 60, 70, 80]], the operation layer is 1 and the output is [[[10, 30]], [20, 40]], [[50, 70]], [60, 80]].
|