import pandas as pd
def _how_merge_df(df: pd.DataFrame, other_df: pd.DataFrame, ids, how='left'):
return df.merge(other_df, on=ids, how=how)
[docs]def outer_merge_df(df: pd.DataFrame, other_df: pd.DataFrame, ids):
return _how_merge_df(df, other_df, ids, how='outer')
[docs]def left_merge_df(df: pd.DataFrame, other_df: pd.DataFrame, ids):
return _how_merge_df(df, other_df, ids, how='left')
[docs]def right_merge_df(df: pd.DataFrame, other_df: pd.DataFrame, ids):
return _how_merge_df(df, other_df, ids, how='right')