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 artificial start and end activities into an event log or a Pandas DataFrame.
- Parameters:
log – The event log or Pandas DataFrame to modify.
activity_key (
str
) – The attribute key used for activities.timestamp_key (
str
) – The attribute key used for timestamps.case_id_key (
str
) – The attribute key used to identify cases.artificial_start (
str
) – The symbol to use for the artificial start activity.artificial_end (
str
) – The symbol to use for the artificial end activity.
- Returns:
The event log or Pandas DataFrame with artificial start and end activities inserted.
- 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' )