pm4py.stats.get_trace_attribute_values#
- pm4py.stats.get_trace_attribute_values(log: EventLog | DataFrame, attribute: str, case_id_key: str = 'case:concept:name') Dict[str, int] [source]#
Returns the values and their frequencies for a specified trace attribute.
- Parameters:
log – Log object (EventLog or pandas DataFrame).
attribute (
str
) – The trace attribute to analyze.case_id_key (
str
) – Attribute to be used as the case identifier.
- Returns:
A dictionary mapping trace attribute values to their frequencies.
import pm4py tr_attr_values = pm4py.get_trace_attribute_values( dataframe, 'case:attribute', case_id_key='case:concept:name' )