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.

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

  • event_identifiers – event identifiers to keep/remove

  • positive (bool) – boolean value (True=keep, False=remove)

Return type:

OCEL

import pm4py

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