deepgraph.deepgraph.DeepGraph.filter_by_interval_v

DeepGraph.filter_by_interval_v(col, interval, endpoint=True)

Keep only nodes in v with features of type col in interval.

Remove all nodes from v (and their corresponding edges in e) with features 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 v, indicating the type of feature used in the filtering.
  • interval (tuple) – A tuple of two values, (value, larger_value). All nodes outside the interval are removed.
  • endpoint (bool, optional (default=True)) – False excludes the endpoint.
Returns:

  • v (pd.DataFrame) – update v
  • e (pd.DataFrame) – update e