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 topandas.DataFrame.merge()
, but with additional options.- Parameters:
- leftDataFrame
- rightDataFrame
- onlabel or list
- left_onlabel or list, or array-like
- right_onlabel or list, or array-like
- merge_suffixes
See
pandas.DataFrame.merge()
,suffixes
parameter. Only added ifadd_suffixes
isTrue
.- 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
andright
respectively (thus creating apandas.MultiIndex
if needed). Pass a value ofNone
instead of a string to indicate that the column index inleft
orright
should be left as-is. At least one of the values must not beNone
.
- Returns:
- DataFrame
A DataFrame of the result.