Match Table lengths

../../../../_images/match_tables.svg

Ensure that two Tables match (i.e. have the same number of rows) by adding or removing rows in one of them.

Documentation

To compare the number of rows in two Tables and resize one of them, in order to have two Tables with equal numbers of rows, is the functionality of the nodes in the considered category. For example, this may be helpful if one would like to horisontal join two Tables with different number of rows, which is not possible according to the definition of a Table, see Tables and HJoin Table.

In the procedure of the node, the Table connected to the upper of the two inputs is used as reference while the Table coming in through the lower port is the one that is going to be modified. The modification can either be a contraction or an extension of the Table depending if it is longer or shorter than the reference Table, respectively.

The extension will be preformed according to one of the following strategies:

  • Use last value

  • Fill with zeroes (or empty strings/dates or similar)

  • Fill with NaNs (or None or similar)

Definition

Input ports

guide table

Guide

input table

Input Table

Output ports

output table

Length matched Table

Configuration

Extend values (fill)

Specify the values to use if the input has to be extended.

Examples

Implementation

class node_match_tables.MatchTwoTables[source]