Network.edges_where

Network.edges_where(conditions, data=False)

Get edges for which a certain condition or set of conditions is true.

Parameters
  • conditions (dict) – A set of conditions in the form of key-value pairs. The keys should be attribute names. The values can be attribute values or ranges of attribute values in the form of min/max pairs.

  • data (bool, optional) – Yield the edges and their data attributes. Default is False.

Yields

tuple – The next edge identifier (u, v), if data is False. Otherwise, the next edge identifier and its attributes as a ((u, v), attr) tuple.