merge_operator¶
Merge multiple dataframes into a single one.
-
class
tasrif.processing_pipeline.pandas.merge_operator.
MergeOperator
(**kwargs)¶ Merge different datasets based on Pandas merge method.
Examples
>>> df1 = pd.DataFrame({'id': [1, 2, 3], 'colors': ['red', 'white', 'blue']}) >>> df2 = pd.DataFrame({'id': [1, 2, 3], 'cities': ['Doha', 'Vienna', 'Belo Horizonte']}) >>> merged = MergeOperator().process(df1, df2) >>> merged id colors cities 1 red Doha 2 white Vienna 3 blue Belo Horizonte
-
__init__
(**kwargs)¶ Merge different datasets on a common feature defined by
on
.- Parameters
**kwargs – key word arguments passed to pandas DataFrame.merge method
-