Concatenate two tables along the columns by merging rows
Concatenate two tables along the columns by merging rows. The total number of columns will be the sum of the two tables. The total number of rows will depend if the two table have common rows (based on name).
If the two table have the same row (based on name), the values of theses rows are concatenated (starting from the first table) into the same row.
If a row doesn't exist in the other table, it will be concatenate with value provided in the Fill empty values with
parameter.
Example
Let's say you have the following tables.
Row names | 1 | 2 |
---|---|---|
A | A1 | A2 |
B | B1 | B2 |
Row names | 3 | 4 |
---|---|---|
A | A3 | A4 |
C | C3 | C4 |
Here is the result of the column concatenation.
Row names | 1 | 2 | 3 | 4 |
---|---|---|---|---|
A | A1 | A2 | A3 | A4 |
B | B1 | B2 | NaN | NaN |
C | NaN | NaN | C3 | C4 |
NaN
value are create for the B
and C
rows because they don't exist in the other table. You can provide another value with the Fill empty values with
parameter.
The first two columns will have the tags from the first table and the last two columns will have the tags from the second.
The row tags will depend on Row tags options
parameter.
Parameters
Row tags options
This parameter allows you to define what to do with the column tags. Here is the different options:
ignore
: the tags are ignored and left emptykeep first
: only the tags of the first table are keeptmerge from first table
: tags of the first and second table are merged (the first table tags override the second table tags)
Output
Configuration
row_tags_options
What to do with the row tags. See doc for more info
string
ignore
fill_nan
Fill empty value generated by the concat with this value
string
NaN