GroupEventsBulk#

Data processor#

class retentioneering.data_processors_lib.group_events_bulk.GroupEventsBulk(params)[source]#

Apply multiple grouping rules simultaneously. See also GroupEvents

Parameters:
grouping_ruleslist or dict
  • If list, each list element is a dictionary with mandatory keys event_name and func and an optional key event_type. Their meaning is the same as for GroupEvents.

  • If dict, the keys are considered as event_name, values are considered as func. Setting event_type is not supported in this case.

ignore_intersectionsbool, default False

If False, a ValueError is raised in case any event from the input eventstream matches more than one grouping rule. Otherwise, the first appropriate rule from grouping_rules is applied.

Returns:
Eventstream

Eventstream with the grouped events according to the given grouping rules.

class retentioneering.data_processors_lib.group_events_bulk.GroupEventsRule(event_name: str, func: Callable[[pandas.core.frame.DataFrame, Optional[retentioneering.eventstream.types.EventstreamSchemaType]], Any], event_type: Optional[str] = None)[source]#

Eventstream#

GroupEventsBulkHelperMixin.group_events_bulk(grouping_rules, ignore_intersections=False)[source]#

Apply multiple grouping rules simultaneously. See also GroupEvents

Parameters:
grouping_ruleslist or dict
  • If list, each list element is a dictionary with mandatory keys event_name and func and an optional key event_type. Their meaning is the same as for GroupEvents.

  • If dict, the keys are considered as event_name, values are considered as func. Setting event_type is not supported in this case.

Returns:
Eventstream

Eventstream with the grouped events according to the given grouping rules.