The unflatten command is used to convert multiple values on the same row into multiple rows. It is the inverse of the flatten command.

Flag

Req'd?

Description

-k key

No

Specifies one or more key fields. Default is to use the first field as the key

-n ndata

No

Specifies how many data items to output on each row - default is 1.



The following example converts the file unflat.csv into multiple rows:

csvfix unflatten data/unflat.csv

producing:

"1","a"
"1","b"
"1","c"
"2","d"
"2","e"
"3","f"
"3","g"
"3","h"
"3","i"

Created with the Personal Edition of HelpNDoc: Create cross-platform Qt Help files