Introduction to Network Analysis in Python
Eric Ma
Data Carpentry instructor and author of nxviz package
G
<networkx.classes.graph.Graph at 0x10c99ecf8>
from itertools import combinations
for n1, n2 in combinations(G.nodes(), 2): print(n1, n2)
0 1
0 2
0 3
0 4
0 5
...
Introduction to Network Analysis in Python