pm4py.analysis.insert_case_arrival_finish_rate#
- pm4py.analysis.insert_case_arrival_finish_rate(log: EventLog | DataFrame, arrival_rate_column='@@arrival_rate', finish_rate_column='@@finish_rate', activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp', case_id_key: str = 'case:concept:name', start_timestamp_key: str = 'time:timestamp') DataFrame [source]#
Inserts the arrival/finish rates of the case in the dataframe. The arrival rate is computed as the difference between the start time of the case and the start time of the previous case to start. The finish rate is computed as the difference between the end time of the case and the end time of the next case to end.
- Parameters:
log – event log / Pandas dataframe
arrival_rate_column (
str
) – column to be used for the arrival ratefinish_rate_column (
str
) – column to be used for the finish rateactivity_key (
str
) – attribute to be used for the activitytimestamp_key (
str
) – attribute to be used for the timestampcase_id_key (
str
) – attribute to be used as case identifierstart_timestamp_key (
str
) – attribute to be used as start timestamp
- Return type:
pd.DataFrame
import pm4py dataframe = pm4py.insert_case_arrival_finish_rate(dataframe, activity_key='concept:name', timestamp_key='time:timestamp', case_id_key='case:concept:name', start_timestamp_key='time:timestamp')