pm4py.filtering.filter_trace_attribute_values(log: Union[EventLog, DataFrame], attribute_key: str, values: Union[Set[str], List[str]], retain: bool = True, case_id_key: str = 'case:concept:name') Union[EventLog, DataFrame][source]#

Filter a log on the values of a trace attribute

  • log – event log / Pandas dataframe

  • attribute_key (str) – attribute to filter

  • values – collection of values to filter

  • retain (bool) – boolean value (keep/discard matching traces)

  • case_id_key (str) – attribute to be used as case identifier

Return type:

Union[EventLog, pd.DataFrame]

import pm4py

filtered_dataframe = pm4py.filter_trace_attribute_values(dataframe, 'case:creator', ['Mike'], case_id_key='case:concept:name')