macpie.pandas.merge#

macpie.pandas.merge(left, right, on=None, left_on=None, right_on=None, merge_suffixes=('_x', '_y'), add_suffixes=False, add_indexes=(None, None)) DataFrame#

Merge pandas.DataFrame objects with a database-style join, similar to pandas.DataFrame.merge(), but with additional options.

Parameters:
leftDataFrame
rightDataFrame
onlabel or list

See pandas.DataFrame.merge()

left_onlabel or list, or array-like

See pandas.DataFrame.merge()

right_onlabel or list, or array-like

See pandas.DataFrame.merge()

merge_suffixes

See pandas.DataFrame.merge(), suffixes parameter. Only added if add_suffixes is True.

add_suffixesbool, default False

Whether to add the suffixes specified in merge_suffixes or not

add_indexeslist-like, default is (None, None)

A length-2 sequence where each element is optionally a string indicating a top-level index to add to columnn indexes in left and right respectively (thus creating a pandas.MultiIndex if needed). Pass a value of None instead of a string to indicate that the column index in left or right should be left as-is. At least one of the values must not be None.

Returns:
DataFrame

A DataFrame of the result.