pm4py.filtering.filter_ocel_events#

pm4py.filtering.filter_ocel_events(ocel: OCEL, event_identifiers: Collection[str], positive: bool = True) OCEL[source]#

Filters the event identifiers of an object-centric event log.

Return type:

OCEL

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

  • event_identifiers – Event identifiers to keep or remove.

  • positive (bool) – Boolean indicating whether to keep (True) or remove (False) the specified event identifiers.

Returns:

Filtered OCEL.

import pm4py

ocel = pm4py.read_ocel('log.jsonocel')
filtered_ocel = pm4py.filter_ocel_events(
    ocel,
    ['e1']
)