pm4py.filtering.filter_start_activities#
- pm4py.filtering.filter_start_activities(log: Union[EventLog, DataFrame], activities: Union[Set[str], List[str]], retain: bool = True, activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp', case_id_key: str = 'case:concept:name') Union[EventLog, DataFrame] [source]#
Filter cases having a start activity in the provided list
- Parameters:
log – event log / Pandas dataframe
activities – collection of start activities
retain (
bool
) – if True, we retain the traces containing the given start activities, if false, we drop the tracesactivity_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 identifier
- Return type:
Union[EventLog, pd.DataFrame]
import pm4py filtered_dataframe = pm4py.filter_start_activities(dataframe, ['Act. A'], activity_key='concept:name', case_id_key='case:concept:name', timestamp_key='time:timestamp')