deepgraph.deepgraph.DeepGraph.filter_by_interval_e

DeepGraph.filter_by_interval_e(col, interval, endpoint=True)[source]

Keep only edges in e with relations of type col in interval.

Remove all edges from e with relations of type col outside the interval given by a tuple of values. The endpoint is included, if endpoint is not set to False.

Parameters:
  • col (str or int) – A column name of e, indicating the type of relation used in the filtering.
  • interval (tuple) – A tuple of two values, (value, larger_value). All edges outside the interval are removed.
  • endpoint (bool, optional (default=True)) – False excludes the endpoint.
Returns:

e – update e

Return type:

pd.DataFrame