I have this GraphML file that I read in Networkx.
So, I refer to all the nodes:
g.nodes()
He gives me a list of strings. Let's say one of them is 123. Then I try to access node as:
g["123"]
and he gives me a dictionary.
Then I try to access the nodes using the nodes function as follows:
for n in g.nodes( data = True ): print n
Then it gives me a 2-tuple with the string node name as the first element and the dictionary as the second element.
The fact is that this is an excellent dictionary from the first. And this is confusing for me, so any help here is appreciated.
Should they be different? If so, why? If not, what am I doing wrong? :) I can post actual data if that helps.
source share