pm4py.filtering.filter_case_size#
- pm4py.filtering.filter_case_size(log: EventLog | DataFrame, min_size: int, max_size: int, case_id_key: str = 'case:concept:name') EventLog | DataFrame [source]#
Filters the event log, keeping the cases having a length (number of events) included between min_size and max_size
- Parameters:
log – event log / Pandas dataframe
min_size (
int
) – minimum allowed number of eventsmax_size (
int
) – maximum allowed number of eventscase_id_key (
str
) – attribute to be used as case identifier
- Return type:
Union[EventLog, pd.DataFrame]
import pm4py filtered_dataframe = pm4py.filter_case_size(dataframe, 5, 10, case_id_key='case:concept:name')