flat
flat ¤
XES-flat exporter — produces a pandas DataFrame with case:concept:name,
concept:name, time:timestamp, lifecycle:transition,
org:resource columns. ts-shape itself does not import pm4py; users
pass this DataFrame to pm4py.format_dataframe themselves.
to_event_log_xes ¤
to_event_log_xes(
eventlog: EventLog,
*,
case_object_type: str = "asset",
lifecycle: str = "single"
) -> pd.DataFrame
Flatten the event log into an XES-style DataFrame.
A trace is built per object of case_object_type — each event linked
to that object becomes one (or two) rows in the trace.
lifecycle="single" — interval events become one row with
lifecycle:transition="complete". time:timestamp is the
interval-end; start_timestamp is exposed verbatim.
lifecycle="two_row" — interval events expand into a start row
(using ts_shape:start_timestamp) and a complete row, paired by
concept:instance.