FilterEvents#

Data processor#

class retentioneering.data_processors_lib.filter_events.FilterEvents(params)[source]#

Filters input eventstream on the basis of custom conditions.

Parameters:
funcCallable[[DataFrame, Optional[EventstreamSchema]], bool]

Custom function that returns boolean mask the same length as input eventstream.

  • If True - the row will be left in the eventstream.

  • If False - the row will be deleted from the eventstream.

Returns:
Eventstream

Eventstream with events that should be deleted from input eventstream.

Notes

See Data processors user guide for the details.

class retentioneering.data_processors_lib.filter_events.FilterEventsParams(*, func)[source]#

A class with parameters for FilterEvents class.

Eventstream#

FilterEventsHelperMixin.filter_events(func)[source]#

A method of Eventstream class that filters input eventstream based on custom conditions.

Parameters:
funcCallable[[DataFrame, Optional[EventstreamSchema]], bool]

Custom function that returns boolean mask the same length as input eventstream.

  • If True - the row will be left in the eventstream.

  • If False - the row will be deleted from the eventstream.

Returns:
Eventstream

The filtered eventstream.