Stack Grids
About Stack Grids
The Stack Grids operation splits a file vertically on selected columns, stacking each slice horizontally.
Example
Use Stack Grids where a file has multiple data grids sharing identical headers arranged horizontally, which need to be combined into a single table.
Input data |
|||||
|---|---|---|---|---|---|
unnamed |
unnamed (0) |
unnamed (1) |
unnamed (2) |
unnamed (3) |
unnamed (4) |
Company |
Value |
Company |
Value |
||
Acme |
100 |
ABC Industries |
120 |
||
NewCo |
200 |
Beta Co |
220 |
||
Z-Corp |
300 |
XYZ Inc |
320 |
||
Total |
600 |
Total |
660 |
Use Stack Grids to select the column ‘unnamed (2)’ as a breakpoint.
Intermediate output |
||
|---|---|---|
unnamed |
unnamed (0) |
unnamed (1) |
Company |
Value |
|
Acme |
100 |
|
NewCo |
200 |
|
Z-Corp |
300 |
|
Total |
600 |
|
Company |
Value |
|
ABC Industries |
120 |
|
Beta Co |
220 |
|
XYZ Inc |
320 |
|
Total |
660 |
Now use Remove Rows, Detect Headers and Clip From Column to tidy up the output.
Final output |
|
|---|---|
Company |
Value |
Acme |
100 |
NewCo |
200 |
Z-Corp |
300 |
ABC Industries |
120 |
Beta Co |
220 |
XYZ Inc |
320 |
Using Stack Grids
- Select ‘Stack Grids’ from the Operations menu.
- Select the columns to use as breakpoints.
- Add further operations as needed to remove surplus rows and define headers.
Note that grids will be stacked in the order that the pipeline encounters the columns in the input file, not their order in the selector. Choosing columns A, E, and D will produce identical output to selecting columns A, D and E.
See a fully-worked example in the Stack Grids and Fill Down tutorial