swat.cas.table.CASTable.merge

CASTable.merge(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

Parameters:
right : CASTable

The CASTable to join with

how : string, 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’
on : string, optional

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

left_on : string, optional

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

right_on : string, optional

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

left_index : boolean, optional

Not supported.

right_index : boolean, optional

Not supported.

sort : boolean, optional

Not supported.

suffixes : two-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.

copy : boolean, optional

Not supported.

indicator : boolean or string, optional

Should a column be created that indicates which table the key came from? 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.

casout : string or CASTable or dict, optional

The CAS output table specification

Returns:
CASTable