pm4py.analysis.insert_artificial_start_end#

pm4py.analysis.insert_artificial_start_end(log: EventLog | DataFrame, activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp', case_id_key: str = 'case:concept:name', artificial_start='▶', artificial_end='■') EventLog | DataFrame[source]#

Inserts the artificial start/end activities in an event log / Pandas dataframe

Parameters:
  • log – event log / Pandas dataframe

  • activity_key (str) – attribute to be used for the activity

  • timestamp_key (str) – attribute to be used for the timestamp

  • case_id_key (str) – attribute to be used as case identifier

  • artificial_start (str) – the symbol to be used as artificial start activity

  • artificial_end (str) – the symbol to be used as artificial end activity

Return type:

Union[EventLog, pd.DataFrame]

import pm4py

dataframe = pm4py.insert_artificial_start_end(dataframe, activity_key='concept:name', case_id_key='case:concept:name', timestamp_key='time:timestamp')