Skip to content

Append rows

Add rows from one dataset to another.

I.e., vertically concatenates two datasets, appending the rows of the second to the end of the first.

When the two datasets contain different columns, the join parameter controls whether only the common columns are kept (inner), or all columns (outer). In the latter case, rows will have missing values (NaNs), where a column only existed in one of the two datasets.

Example

To append the rows of dataset ds_right to the dataset ds_left, keeping all columns from both datasets:

append_rows(ds_left, ds_right) -> (ds_out)

Usage

The following are the step's expected inputs and outputs and their specific types.

append_rows(
    ds_left: dataset,
    ds_right: dataset, 
    {
        "param": value
    }
) -> (result: dataset)

where the object {"param": value} is optional in most cases and if present may contain any of the parameters described in the corresponding section below.

Inputs


ds_left: dataset

An input dataset.


ds_right: dataset

A second dataset whose rows to append below the original dataset (ds_left).

Outputs


result: dataset

A dataset containing the rows of both ds_left, and ds_right, as well as an aditional column original_index indicating the index of each row in its original dataset.

Parameters


join: string = "outer"

Whether to do concatenate using an "inner" or "outer" join of columns. When "inner", only common columns will be kept. When "outer", all columns will be kept.

Must be one of: "inner", "outer"