Unpivot

The Unpivot step allows to to transform columns into rows. It is the reverse operation of a pivot step.

Unpivoting columns into a unique column means that every unpivoted column header will be used as a label in the output unique column. The columns get unpivoted “around” fixed columns that you can specify. The step creates two new columns: a variable column where you can find the labels corresponding to the unpivoted columns headers, and a value column where you can find the value for every label.

Step parameters

  • Keep columns...: the columns to remain fixed, around which the unpivot will occur

  • Unpivot columns...: the columns to be unpivoted

  • Drop null values...: whether to drop rows if their value is null in the output value column

Example

Input

Reshape - unpivot - input

Configuration

{
    "keep": ["COMPANY", "COUNTRY"],
    "unpivot": ["NB_CLENTS", "REVENUES"],
    "dropna": true
}

Output

Reshape - unpivot - output

Last updated

Was this helpful?