concat_operator¶
Concatenate multiple dataframes into a single one.
-
class
tasrif.processing_pipeline.pandas.concat_operator.
ConcatOperator
(**kwargs)¶ Concatenate different datasets based on Pandas concat method.
Examples
>>> import pandas as pd >>> >>> from tasrif.processing_pipeline.pandas import ConcatOperator >>> >>> # Full >>> df1 = pd.DataFrame({'id': [1, 2, 3], 'cities': ['Rome', 'Barcelona', 'Stockholm']}) >>> df2 = pd.DataFrame({'id': [4, 5, 6], 'cities': ['Doha', 'Vienna', 'Belo Horizonte']}) >>> >>> concat = ConcatOperator().process(df1, df2) >>> concat id cities 0 1 Rome 1 2 Barcelona 2 3 Stockholm 0 4 Doha 1 5 Vienna 2 6 Belo Horizonte
-
__init__
(**kwargs)¶ Merge different datasets on a common feature defined by
on
.- Parameters
**kwargs – key word arguments passed to pandas concat method
-