In [2]: g=networkx.complete_graph(4)
In [3]: h=networkx.complete_graph(4)
In [4]: gh=networkx.union(g,h,rename=('g-','h-'))
In [5]: gh.nodes()
Out[5]: ['h-0', 'h-1', 'h-2', 'h-3', 'g-3', 'g-2', 'g-1', 'g-0']
In [6]: gh=networkx.disjoint_union(g,h)
In [7]: gh.nodes()
Out[7]: [0, 1, 2, 3, 4, 5, 6, 7]
Aric
If you have a lot of graphs to union this way, you could
have the nodes be graph_number-node_number
e.g. 12-3 for third node of 12th graph
Is this what you are looking for?
Dan