pm4py.filtering.filter_ocel_event_attribute#

pm4py.filtering.filter_ocel_event_attribute(ocel: OCEL, attribute_key: str, attribute_values: Collection[Any], positive: bool = True) OCEL[source]#

Filters the object-centric event log on the provided event attributes values

Parameters:
  • ocel (OCEL) – object-centric event log

  • attribute_key (str) – attribute at the event level

  • attribute_values – collection of attribute values

  • positive (bool) – decides if the values should be kept (positive=True) or removed (positive=False)

Return type:

OCEL

import pm4py

filtered_ocel = pm4py.filter_ocel_event_attribute(ocel, 'ocel:activity', ['A', 'B', 'D'])