dataframefilter
dataframefilter ¶
Module for abstract dataframe filter
Classes¶
DataframeFilter ¶
Bases: ABC
Filter to filter data of a dataframe
Filter to filter data of a dataframe
Source code in niceml/data/datafilters/dataframefilter.py
Functions¶
filter
abstractmethod
¶
The filter function takes a dataframe and returns a filtered version of the dataframe. The filter function should return the filtered data.
Parameters:
-
data
(DataFrame
) –pd.DataFrame: Pass the data to be filtered
Returns:
-
DataFrame
–A dataframe with the same columns as data, but only containing rows where the
-
DataFrame
–filter condition is true
Source code in niceml/data/datafilters/dataframefilter.py
initialize ¶
The initialize function is called once at the beginning of a run. It can be used to set up any data structures that are needed for the rest of the run. The initialize function takes one argument, which is a data description containing information about what data will be available during this run.
Parameters:
-
data_description
(DataDescription
) –DataDescription: Describe the data that is being passed into the model