pm4py.statistics.sojourn_time.pandas package

Submodules

pm4py.statistics.sojourn_time.pandas.get module

class pm4py.statistics.sojourn_time.pandas.get.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
BUSINESS_HOURS = 'business_hours'
START_TIMESTAMP_KEY = 'pm4py:param:start_timestamp_key'
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'
WEEKENDS = 'weekends'
WORKTIMING = 'worktiming'
pm4py.statistics.sojourn_time.pandas.get.apply(dataframe, parameters=None)[source]

Gets the sojourn time per activity on a Pandas dataframe

Parameters
  • dataframe – Pandas dataframe

  • parameters – Parameters of the algorithm, including: - Parameters.ACTIVITY_KEY => activity key - Parameters.START_TIMESTAMP_KEY => start timestamp key - Parameters.TIMESTAMP_KEY => timestamp key - Parameters.BUSINESS_HOURS => calculates the difference of time based on the business hours, not the total time.

    Default: False

    • Parameters.WORKTIMING => work schedule of the company (provided as a list where the first number is the start
      of the work time, and the second number is the end of the work time), if business hours are enabled

      Default: [7, 17] (work shift from 07:00 to 17:00)

    • Parameters.WEEKENDS => indexes of the days of the week that are weekend

      Default: [6, 7] (weekends are Saturday and Sunday)

Returns

Sojourn time dictionary

Return type

soj_time_dict

Module contents