pm4py.ocel.ocel_flattening#
- pm4py.ocel.ocel_flattening(ocel: OCEL, object_type: str) DataFrame [source]#
Flattens the object-centric event log to a traditional event log based on a chosen object type. In the flattened log, the objects of the specified type are treated as cases, and each case contains the set of events related to that object. The flattened log follows the XES notations for case identifier, activity, and timestamp. Specifically: - “case:concept:name” is used for the case ID. - “concept:name” is used for the activity. - “time:timestamp” is used for the timestamp.
- Parameters:
ocel (OCEL) – Object-centric event log.
object_type (str) – The object type to use as cases.
- Returns:
Flattened traditional event log.
- Return type:
pd.DataFrame
import pm4py event_log = pm4py.ocel_flattening(ocel, 'items')