drop_node_attributes
Removes node attributes if they exist.
Parameters
- g : SAS graph object
-
Specifies the input graph to remove node attributes from.
- attributes_subset : str or list, optional
-
Specifies the node attribute or list of node attributes to remove; for example, [‘weight’,’color’]. By default, all node attributes are removed.
- nodes_subset : list or iterable of nodes, optional
-
Specifies the nodes to drop attributes from; for example, [1,2,3] or (1,2,3) or [1] or (1,). By default, the attributes for all nodes are removed.
- immutable : bool or None, optional
-
Specifies whether or not to return an immutable copy. The default is None, which means that the mutability matches the input graph.
- inplace : bool, optional
-
Specifies whether or not to modify the graph in place. The default is False.
Returns
- SAS graph object or None
-
If the inplace parameter value is True, the graph is modified by removing the specified node attributes. If the inplace parameter value is False, a copy of the input graph with the modified node attributes is returned.