rta_selection.filters.filter_events

rta_selection.filters.filter_events(events: DataFrame, filters: dict[str, list[float]] | None = None, finite_params=None)[source]

Apply data filtering to a pandas dataframe. Each filtering range is applied if the column name exists in the DataFrame so that (events >= range[0]) & (events <= range[1]) If the column name does not exist, the filtering is simply not applied

Parameters:
  • events (pandas.DataFrame)

  • filters (dict containing events features names and their filtering range)

  • finite_params (optional, None or list of strings) – extra filter to ensure finite parameters

Return type:

pandas.DataFrame