CASTable.merge(self, right, how='inner', on=None, left_on=None, right_on=None, left_index=False, right_index=False, sort=False, suffixes=('_x', '_y'), copy=True, indicator=False, casout=None)

Merge CASTable objects using a database-style join on a column


The CASTable to join with

howstring, optional
  • ‘left’ : use only keys from self

  • ‘right’: use only keys from right

  • ‘outer’ : all observations

  • ‘inner’ : use intersection of keys

  • ‘left-minus-right’ : self minus right

  • ‘right-minus-left’ : right minus self

  • ‘outer-minus-inner’ : opposite of ‘inner’

onstring, optional

Column name to join on, if the same column name is in both tables

left_onstring, optional

The key from self to join on. This is used if the column names to join on are different in each table.

right_onstring, optional

The key from right to join on. This s used if the column names to join on are different in each table.

left_indexboolean, optional

Not supported.

right_indexboolean, optional

Not supported.

sortboolean, optional

Not supported.

suffixestwo-element-tuple, optional

The suffixes to use for overlapping column names in the resulting tables. The first element is used for columns in self. The second element is used for columns in right.

copyboolean, optional

Not supported.

indicatorboolean or string, optional

If True, a column named ‘_merge’ will be created with the values: ‘left_only’, ‘right_only’, or ‘both’. If False, no column is created. If a string is specified, a column is created using that name containing the aforementioned values.

casoutstring or CASTable or dict, optional

The CAS output table specification