GroupEvents#
Data processor#
- class retentioneering.data_processors_lib.group_events.GroupEvents(params)[source]#
- Filter the specified events from the input - eventstreamand 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
- Eventstreamwith:- new synthetic events with - group_aliasor custom type
- raw 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 - GroupEventsclass.
Eventstream#
- GroupEventsHelperMixin.group_events(event_name, func, event_type='group_alias')[source]#
- A method of - Eventstreamclass that filters and replaces raw events with new synthetic events, having the same- timestampand- user_id, but new- event_name.- 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
- Input - eventstreamwith replaced events.