pm4py.analysis.insert_case_service_waiting_time#
- pm4py.analysis.insert_case_service_waiting_time(log: EventLog | DataFrame, service_time_column: str = '@@service_time', sojourn_time_column: str = '@@sojourn_time', waiting_time_column: str = '@@waiting_time', 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 service/waiting/sojourn times of the case in the dataframe.
- Parameters:
log – event log / Pandas dataframe
service_time_column (
str
) – column to be used for the service timesojourn_time_column (
str
) – column to be used for the sojourn timewaiting_time_column (
str
) – column to be used for the waiting timeactivity_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_service_waiting_time(dataframe, activity_key='concept:name', timestamp_key='time:timestamp', case_id_key='case:concept:name', start_timestamp_key='time:timestamp')