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 based on the provided event attribute values.
- Return type:
- Parameters:
ocel (
OCEL
) – Object-centric event log.attribute_key (
str
) – Attribute at the event level to filter.attribute_values – Collection of attribute values to keep or remove.
positive (
bool
) – Determines whether the values should be kept (True) or removed (False).
- Returns:
Filtered OCEL.
import pm4py filtered_ocel = pm4py.filter_ocel_event_attribute( ocel, 'ocel:activity', ['A', 'B', 'D'] )