Back to bricks list
Introduction Getting Started
Architecture
Technical Documentation
Tasks
Barplot Plotly Boxplot Plotly Conda env agent Converter Create a sugar type of food Create folder from files Create json dict Create lab note Create note resource Create robot Decompress file Describe Download an scenario Download resource from a S3 bucket Download resource from external source Eat task Env agent Extract column tags to new row Extract column values to row tags Extract row tags to new column Extract row values to column tags Fly task Folder exporter Fs node extractor Generate lab note from note resource GenerateStreamlitTestApp Histogram Plotly Input Input from task output JSON Dict exporter JSON Dict importer Line Plotly Mamba env agent Melt Merge note resources Move robot Output Pip env agent Python agent R conda env agent R mamba env agent Resource exporter Resource importer Resource picker Resource set exporter Resource stacker Robot add Scatterplot Plotly Select a scenario Select note Select note template Send a scenario to a lab Send the resource to a lab Shell wait Smart interactive plot generator Smart json transformer Smart multi tables transformer Smart plot generator Smart table transformer Streamlit agent Streamlit conda agent Streamlit env agent Streamlit mamba agent Streamlit pip env agent Switch2 Table column aggregator Table column aggregator filter Table column annotator Table column concat Table column data numeric filter Table column data text filter Table column operation mass Table column operations Table column scaler Table column tag aggregator Table column tag unfolder Table column tags deleter Table column tags selector Table columns deleter Table columns selector Table exporter Table importer Table replace Table row aggregator Table row aggregator filter Table row annotator Table row concat Table row data numeric filter Table row data text filter Table row scaler Table row tag aggregator Table row tag unfolder Table row tags deleter Table row tags selector Table rows deleter Table rows selector Table scaler Table transposer Task Task Plotly Text exporter Text importer The travel of `Astro` Transformer Unzip and load resource Update note resource Upload resource to S3 Viewer Violinplot Plotly Wait Wait task Write to file Zip resource [Support] Update process typing name [Support] Update resource typing name
Version

Table column concat

TASK
Typing name :  TASK.gws_core.TableColumnConcat Brick :  gws_core

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 empty
  • keep first: only the tags of the first table are keept
  • merge from first table: tags of the first and second table are merged (the first table tags override the second table tags)

Input

First table
2d excel like table
Second table
2d excel like table

Output

Concatenated table
2d excel like table

Configuration

row_tags_options

Optional

What to do with the row tags. See doc for more info

Type : stringAllowed values : ignore keep first merge from first table Default value : ignore

fill_nan

Optional

Fill empty value generated by the concat with this value

Type : stringAllowed values : NaN Empty 0 Default value : NaN