Lucid.CSV.ReshapeRowsAndColumns¶
This task type reshapes the rows and columns of a table:
Pivot / Unpivot¶
Pivot reshapes a “long” table into a “wide” table. Unpivot is the inverse of pivot. (Also known as “melt”.)
AB
XA1 ----pivot--> X12
XB2 <--unpivot-- Y34
YA3
YB4
Stack / Unstack¶
Stack reshape a table so one level of column names turns into a new column. Unstack is the inverse of stack.
XAB X
i12 ----stack--> iA1
j56 <--unstack-- iB2
jA3
jB4