pm4py.stats.get_variants_as_tuples#
- pm4py.stats.get_variants_as_tuples(log: EventLog | DataFrame, activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp', case_id_key: str = 'case:concept:name') Dict[Tuple[str], List[Trace]] | Dict[Tuple[str], int] [source]#
Gets the variants from the log (where the keys are tuples and not strings)
- Parameters:
log – Event log
activity_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:
Dict[Tuple[str], List[Trace]]
import pm4py variants = pm4py.get_variants_as_tuples(dataframe, activity_key='concept:name', case_id_key='case:concept:name', timestamp_key='time:timestamp')