pm4py.filtering.filter_case_performance#
- pm4py.filtering.filter_case_performance(log: EventLog | DataFrame, min_performance: float, max_performance: float, timestamp_key: str = 'time:timestamp', case_id_key: str = 'case:concept:name') EventLog | DataFrame [source]#
Filters the event log, keeping cases that have a duration (the timestamp of the last event minus the timestamp of the first event) between min_performance and max_performance.
- Parameters:
log – Event log or Pandas DataFrame.
min_performance (
float
) – Minimum allowed case duration.max_performance (
float
) – Maximum allowed case duration.timestamp_key (
str
) – Attribute to be used for the timestamp.case_id_key (
str
) – Attribute to be used as case identifier.
- Returns:
Filtered event log or Pandas DataFrame.
import pm4py filtered_dataframe = pm4py.filter_case_performance( dataframe, 3600.0, 86400.0, timestamp_key='time:timestamp', case_id_key='case:concept:name' )