networkx.classes.reportviews.NodeDataView#

class NodeDataView(nodedict, data=False, default=None)[source]#

A DataView class for nodes of a NetworkX Graph

The main use for this class is to iterate through node-data pairs. The data can be the entire data-dictionary for each node, or it can be a specific attribute (with default) for each node. Set operations are enabled with NodeDataView, but don’t work in cases where the data is not hashable. Use with caution. Typically, set operations on nodes use NodeView, not NodeDataView. That is, they use G.nodes instead of G.nodes(data='foo').

Parameters:
graphNetworkX graph-like class
databool or string (default=False)
defaultobject (default=None)
__init__(nodedict, data=False, default=None)[source]#

Methods

isdisjoint(other)

Return True if two sets have a null intersection.