The node attributes are stored in the dictionary G.node_attr.
So you should be able to write
>>> for n in G:
... print G.node_attr[n]['label']
etc.
We are developing classes to more smoothly handle attributes
https://networkx.lanl.gov/trac/ticket/226
but they are still prototypes and not integrated yet into
all of the input and output formats.
Aric
Can you send a small example and also what NetworkX version you are using?
Aric
connected_component_subgraphs is not getting the attributes copied
correctly. This is a wart in the current hack for handling node attributes
that we will fix with the new code I mentioned earlier.
In the meantime you could use a reference to the attributes in G with
H.node_attr=G.node_attr
Aric