maxframe.liteframe.merge#

maxframe.liteframe.merge(self, right, how='inner', on=None, left_on=None, right_on=None, suffixes=('', '_y'), method='auto', auto_merge='both', auto_merge_threshold=8, bloom_filter='auto', bloom_filter_options=None)[source]#

Merge LiteFrame with another LiteFrame using a database-style join.

Parameters:
  • right (LiteFrame) – Object to merge with.

  • how ({'left', 'right', 'outer', 'inner'}, default 'inner') – Type of merge to perform.

  • on (str or list of str, optional) – Column(s) to join on. Must exist in both LiteFrames.

  • left_on (str or list of str, optional) – Column(s) from left LiteFrame to join on.

  • right_on (str or list of str, optional) – Column(s) from right LiteFrame to join on.

  • suffixes (tuple of (str, str), default ('', '_y')) – Suffixes for overlapping column names.

  • method ({'auto', 'shuffle', 'broadcast'}, default 'auto') – Merge execution strategy.

  • auto_merge ({'both', 'none', 'before', 'after'}, default 'both') – Auto merge small chunks before/after merge.

  • auto_merge_threshold (int, default 8) – Chunk count threshold for triggering auto-merge.

  • bloom_filter (bool or 'auto', default 'auto') – Whether to use bloom filter optimization.

  • bloom_filter_options (dict, optional) – Bloom filter configuration.

Returns:

Merged result.

Return type:

LiteFrame

See also

concat

Concatenate LiteFrame objects along a particular axis.

Examples

>>> import maxframe.liteframe as mlf
>>> lf = mlf.LiteFrame({'key': [1, 2, 3], 'a': [10, 20, 30]})
>>> other = mlf.LiteFrame({'key': [2, 3, 4], 'b': [200, 300, 400]})
>>> result = lf.merge(other, on='key')
>>> result.execute()
   key   a    b
0    2  20  200
1    3  30  300