GroupEvents#
Data processor#
- class retentioneering.data_processors_lib.group_events.GroupEvents(params)[source]#
Filter the specified events from the input
eventstream
and create new synthetic events, with names based on the old events’ names.- Parameters:
- event_namestr
Name of the created event.
- funcCallable[[DataFrame, EventstreamSchema], Any]
Custom function that returns boolean mask with the same length as input eventstream.
If
True
- events will be grouped.If
False
- events will be remained.
- event_typestr, default “group_alias”
Event_type name for the grouped events. If custom event_type is created, it should be added to the
DEFAULT_INDEX_ORDER
.
- Returns:
- Eventstream
Eventstream
with:new synthetic events with
group_alias
or custom typeraw events marked
_deleted=True
event_name
event_type
timestamp
_deleted
raw_event_name
raw
raw_event
True
new_event_name
group_alias
raw_event
False
Notes
See Data processors user guide for the details.
- class retentioneering.data_processors_lib.group_events.GroupEventsParams(*, event_name, func, event_type='group_alias')[source]#
A class with parameters for
GroupEvents
class.
Eventstream#
- GroupEventsHelperMixin.group_events(event_name, func, event_type='group_alias')[source]#
A method of
Eventstream
class that filters and replaces raw events with new synthetic events, having the sametimestamp
anduser_id
, but newevent_name
.- Parameters:
- See parameters description
- Returns:
- Eventstream
Input
eventstream
with replaced events.