deepgraph.deepgraph.DeepGraph.filter_by_values_v

DeepGraph.filter_by_values_v(col, values)[source]

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

Remove all nodes from v (and their corresponding edges in e) with feature(s) of type col not in the list of features given by values.

Parameters:
  • col (str or int) – A column name of v, indicating the type of feature used in the filtering.
  • values (object or array_like) – The value(s) indicating which nodes to keep.
Returns:

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