pm4py.filtering.filter_ocel_object_types#

pm4py.filtering.filter_ocel_object_types(ocel: OCEL, obj_types: Collection[str], positive: bool = True, level: int = 1) OCEL[source]#

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

Return type:

OCEL

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

  • obj_types – Object types to keep or remove.

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

  • level (int) – Recursively expands the set of object identifiers until the specified level.

Returns:

Filtered OCEL.

import pm4py

ocel = pm4py.read_ocel('log.jsonocel')
filtered_ocel = pm4py.filter_ocel_object_types(
    ocel,
    ['order']
)