recpack.preprocessing.filters.Filter

class recpack.preprocessing.filters.Filter

Abstract baseclass for filter implementations

A filter needs to implement an apply method, which takes as input a pandas DataFrame, and returns a processed pandas DataFrame.

Methods

apply(df)

Apply Filter to the DataFrame passed.

apply_all(*dfs)

Apply the filter to a list of pandas DataFrames.

abstract apply(df: pandas.core.frame.DataFrame) pandas.core.frame.DataFrame

Apply Filter to the DataFrame passed.

Parameters

df (pd.DataFrame) – DataFrame to filter

apply_all(*dfs: pandas.core.frame.DataFrame) List[pandas.core.frame.DataFrame]

Apply the filter to a list of pandas DataFrames.

The filter is applied independently to each of the DataFrames.

Returns

The list of processed DataFrames

Return type

List[pd.DataFrame]