Intermediate Network Analysis in Python
Eric Ma
Data Carpentry instructor and author of nxviz package
.difference(G1, G2)
functionG1
and G2
have equal node setslist(G1.edges())
[('cust1', 'cust2'), ('cust3', 'cust2')]
list(G2.edges())
[('cust1', 'cust3'), ('cust3', 'cust2')]
G2minusG1 = nx.difference(G2, G1)
G1minusG2 = nx.difference(G1, G2)
Intermediate Network Analysis in Python