Quantemplate requires a defined set of column headers to perform downstream operations. When using uploaded inputs, headers will be automatically titled ‘unnamed’, unnamed (0)’, etc. A typical workflow uses Remove Rows to strip out any blank or unwanted rows above the data, then Detect Headers to define one or more rows as the header.
Detect Headers can convert a multi-row header into a single row header and can handle multiple files with varying numbers of header rows.
If needed, use a Remove Rows operation to strip out unwanted rows above the data. Then add a Detect Headers operation from the Operations menu. Enter the number of rows to select and merge into a single header row.
Detect Headers can merge up to 10 rows into the header row.
Take an input file with 2 rows of headers and merge into a single row
unnamed |
unnamed (0) |
unnamed (1) |
unnamed (2) |
unnamed (3) |
unnamed (4) |
unnamed (5) |
unnamed (6) |
2015 |
2016 |
||||||
Q1 |
Q2 |
Q3 |
Q4 |
Q1 |
Q2 |
Q3 |
Q4 |
27492 |
20144 |
17594 |
85993 |
104288 |
49004 |
40100 |
38299 |
Use first 2 rows as the header
2015:Q1 |
2015:Q2 |
2015:Q3 |
2015:Q4 |
2016:Q1 |
2016:Q2 |
2016:Q3 |
2016:Q4 |
27492 |
20144 |
17594 |
85993 |
104288 |
49004 |
40100 |
38299 |
In scenarios where input files have differing numbers of rows in the header, it can sometimes be useful to assume that the first row containing only numbers is the first record in the data, whilst the rows above are headers.
Selecting the option to ‘Interpret non-numeric rows as headers’ will look at the first rows, up to the maximum number defined in the operation, and select them as headers if they contain non-numeric data (i.e. text, blanks). The first row will always be taken as a header, regardless of content
unnamed |
unnamed (0) |
unnamed (1) |
unnamed (2) |
unnamed (3) |
unnamed (4) |
unnamed (5) |
unnamed (6) |
2015-Q1 |
2015-Q2 |
2015-Q3 |
2015-Q4 |
2016-Q1 |
2016-Q2 |
2016-Q3 |
2016-Q4 |
27492 |
20144 |
17594 |
85993 |
104288 |
49004 |
40100 |
38299 |
unnamed |
unnamed (0) |
unnamed (1) |
unnamed (2) |
unnamed (3) |
unnamed (4) |
unnamed (5) |
unnamed (6) |
2015 |
2016 |
||||||
Q1 |
Q2 |
Q3 |
Q4 |
Q1 |
Q2 |
Q3 |
Q4 |
35322 |
12344 |
12345 |
65322 |
43234 |
34466 |
23456 |
23455 |
Use the first 2 rows as the header. Interpret non-numeric rows as headers.
This will take the first row and any subsequent rows which do not have a numeric value as the header, up to a maximum of 2 rows.
2015-Q1 |
2015-Q2 |
2015-Q3 |
2015-Q4 |
2016-Q1 |
2016-Q2 |
2016-Q3 |
2016-Q4 |
27492 |
20144 |
17594 |
85993 |
104288 |
49004 |
40100 |
38299 |
2015:Q1 |
2015:Q2 |
2015:Q3 |
2015:Q4 |
2016:Q1 |
2016:Q2 |
2016:Q3 |
2016:Q4 |
35322 |
12344 |
12345 |
65322 |
43234 |
34466 |
23456 |
23455 |