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 with the choice of an object type. In the flattened log, the objects of a given object type are the cases, and each case contains the set of events related to the object. The flattened log follows the XES notations for case identifier, activity, and timestamp. In particular: - “case:concept:name” is the column used for the case ID. - “concept:name” is the column used for the activity. - “time:timestamp” is the column used for the timestamp.
- Parameters:
ocel (
OCEL
) – object-centric event logobject_type (
str
) – object type
- Return type:
pd.DataFrame
import pm4py event_log = pm4py.ocel_flattening(ocel, 'items')