spread-rows

Spreads rows in long format to wide format.

Reshapes the datatable from long to wide. Reduces the number of rows, and increases the number of columns.

This adaptor is the opposite of gather-rows, which reshapes from long to wide format.

Arguments

Inputs:

data: The input datatable in long format.

columns: The list of columns which will not be reshaped. If unspecified, all columns will be reshaped.

key: The name of the column to which keys are added. If unspecified, defaults to key.

value: The name of the column to which values are added. If unspecified, defaults to value.

Output:

output: A datatable in wide format.

Last updated