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 in the provided timestamp range

Parameters:
  • ocel (OCEL) – object-centric event log

  • min_timest – left extreme of the allowed timestamp interval (provided in the format: YYYY-mm-dd HH:MM:SS)

  • max_timest – right extreme of the allowed timestamp interval (provided in the format: YYYY-mm-dd HH:MM:SS)

  • timestamp_key (str) – the attribute to use as timestamp (default: ocel:timestamp)

Return type:

OCEL

import pm4py

filtered_ocel = pm4py.filter_ocel_events_timestamp(ocel, '1990-01-01 00:00:00', '2010-01-01 00:00:00')