pm4py.algo.filtering.pandas.auto_filter package

Submodules

pm4py.algo.filtering.pandas.auto_filter.auto_filter module

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

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
ATTRIBUTE_KEY = 'pm4py:param:attribute_key'
CASE_ID_KEY = 'case_id_glue'
DECREASING_FACTOR = 'decreasingFactor'
ENABLE_ACTIVITES_FILTER = 'enable_activities_filter'
ENABLE_END_ACTIVITIES_FILTER = 'enable_end_activities_filter'
ENABLE_START_ACTIVITIES_FILTER = 'enable_start_activities_filter'
ENABLE_VARIANTS_FILTER = 'enable_variants_filter'
POSITIVE = 'positive'
RETURN_EA_COUNT = 'return_ea_count_dict_autofilter'
pm4py.algo.filtering.pandas.auto_filter.auto_filter.apply_auto_filter(df, parameters=None)[source]

Apply some filters to Pandas dataframe in order to get a simpler dataframe

Parameters
  • df – Dataframe

  • parameters

    Eventual parameters passed to the algorithms:

    Parameters.CASE_ID_KEY -> Column where the case ID is present Parameters.ACTIVITY_KEY -> Column where the activity is present Parameters.DECREASING_FACTOR -> Decreasing factor (provided to all algorithms) Parameters.ENABLE_ACTIVITES_FILTER -> Enables or disables auto filter on activities number (it is useful to disable if the dataframe has been already filtered by activities number before). Default is True Parameters.ENABLE_VARIANTS_FILTER -> Enables or disables auto filter on variants (that is slower than others). Default is False Parameters.ENABLE_START_ACTIVITIES_FILTER -> Enables or disables auto filter on start activities. Default is False Parameters.ENABLE_END_ACTIVITIES_FILTER -> Enables or disables auto filter on end activities. Default is True

Returns

Filtered dataframe

Return type

df

Module contents