pm4py.hof module#
- pm4py.hof.filter_log(f: Callable[[Any], bool], log: EventLog) EventLog | EventStream[source]#
Filters the log according to a given (lambda) function.
- Parameters:
f – function that specifies the filter criterion, may be a lambda
log – event log; either EventLog or EventStream Object
- Return type:
Union[log_inst.EventLog, log_inst.EventStream]
Deprecated since version 2.3.0: This will be removed in 3.0.0. the EventLog class will be removed in a future release.
- pm4py.hof.filter_trace(f: Callable[[Any], bool], trace: Trace) Trace[source]#
Filters the trace according to a given (lambda) function.
- Parameters:
f – function that specifies the filter criterion, may be a lambda
trace – trace; PM4Py trace object
- Return type:
log_inst.Trace
- pm4py.hof.sort_log(log: EventLog, key, reverse: bool = False) EventLog | EventStream[source]#
Sorts the event log according to a given key.
- Parameters:
log – event log object; either EventLog or EventStream
key – sorting key
reverse – indicates whether sorting should be reversed or not
- Return type:
Union[log_inst.EventLog, log_inst.EventStream]
Deprecated since version 2.3.0: This will be removed in 3.0.0. the EventLog class will be removed in a future release.
- pm4py.hof.sort_trace(trace: Trace, key, reverse: bool = False) Trace[source]#
Sorts the events in a trace according to a given key.
- Parameters:
trace – input trace
key – sorting key
reverse – indicates whether sorting should be reversed (default False)
- Return type:
log_inst.Trace
Deprecated since version 2.3.0: This will be removed in 3.0.0. the EventLog class will be removed in a future release.