pm4py.algo.filtering.pandas.timestamp package

Submodules

pm4py.algo.filtering.pandas.timestamp.timestamp_filter module

class pm4py.algo.filtering.pandas.timestamp.timestamp_filter.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

CASE_ID_KEY = 'case_id_glue'
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'
pm4py.algo.filtering.pandas.timestamp.timestamp_filter.apply(df, parameters=None)[source]
pm4py.algo.filtering.pandas.timestamp.timestamp_filter.apply_auto_filter(df, parameters=None)[source]
pm4py.algo.filtering.pandas.timestamp.timestamp_filter.apply_events(df, dt1, dt2, parameters=None)[source]

Get a new log containing all the events contained in the given interval

Parameters
  • df – Pandas dataframe

  • dt1 – Lower bound to the interval (possibly expressed as string, but automatically converted)

  • dt2 – Upper bound to the interval (possibly expressed as string, but automatically converted)

  • parameters

    Possible parameters of the algorithm, including:

    Parameters.TIMESTAMP_KEY -> Attribute to use as timestamp

Returns

Filtered dataframe

Return type

df

pm4py.algo.filtering.pandas.timestamp.timestamp_filter.filter_traces_attribute_in_timeframe(df, attribute, attribute_value, dt1, dt2, parameters=None)[source]

Get a new log containing all the traces that have an event in the given interval with the specified attribute value

Parameters
  • df – Dataframe

  • attribute – The attribute to filter on

  • attribute_value – The attribute value to filter on

  • dt1 – Lower bound to the interval

  • dt2 – Upper bound to the interval

  • parameters

    Possible parameters of the algorithm, including:

    Parameters.TIMESTAMP_KEY -> Attribute to use as timestamp

Returns

Filtered dataframe

Return type

df

pm4py.algo.filtering.pandas.timestamp.timestamp_filter.filter_traces_contained(df, dt1, dt2, parameters=None)[source]

Get traces that are contained in the given interval

Parameters
  • df – Pandas dataframe

  • dt1 – Lower bound to the interval (possibly expressed as string, but automatically converted)

  • dt2 – Upper bound to the interval (possibly expressed as string, but automatically converted)

  • parameters

    Possible parameters of the algorithm, including:

    Parameters.TIMESTAMP_KEY -> Attribute to use as timestamp Parameters.CASE_ID_KEY -> Column that contains the timestamp

Returns

Filtered dataframe

Return type

df

pm4py.algo.filtering.pandas.timestamp.timestamp_filter.filter_traces_intersecting(df, dt1, dt2, parameters=None)[source]

Filter traces intersecting the given interval

Parameters
  • df – Pandas dataframe

  • dt1 – Lower bound to the interval (possibly expressed as string, but automatically converted)

  • dt2 – Upper bound to the interval (possibly expressed as string, but automatically converted)

  • parameters

    Possible parameters of the algorithm, including:

    Parameters.TIMESTAMP_KEY -> Attribute to use as timestamp Parameters.CASE_ID_KEY -> Column that contains the timestamp

Returns

Filtered dataframe

Return type

df

Module contents