pm4py.filtering.filter_ocel_events_timestamp#
- pm4py.filtering.filter_ocel_events_timestamp(ocel: OCEL, min_timest: datetime | str, max_timest: datetime | str, timestamp_key: str = 'ocel:timestamp') OCEL [source]#
Filters the object-centric event log, keeping events within the provided timestamp range.
- Return type:
- Parameters:
ocel (
OCEL
) – Object-centric event log.min_timest – Left extreme of the allowed timestamp interval (format: YYYY-mm-dd HH:MM:SS).
max_timest – Right extreme of the allowed timestamp interval (format: YYYY-mm-dd HH:MM:SS).
timestamp_key (
str
) – The attribute to use as timestamp (default: ocel:timestamp).
- Returns:
Filtered OCEL.
import pm4py filtered_ocel = pm4py.filter_ocel_events_timestamp( ocel, '1990-01-01 00:00:00', '2010-01-01 00:00:00' )