I encountered a major problem while constructing a bipartite graph with Networkx.
I take the nodes from a 2-columns csv, say
CODINV2;APPLN_ID
1;3
1;4
1;5
2;3
2;6
3;6
4;12
After moving each column into a separate list the code to store the nodes is
G=nx.Graph()
G.add_nodes_from(codinv, bipartite=0)
G.add_nodes_from(app_id, bipartite=1)
Then i add the edges (based on the csv rows):
for index,row in appl.iterrows():
G.add_edge(row['APPLN_ID'], row['CODINV2'])
Now the links are actually created, but if i look again at nodes attributes, now many of them are wrongly considered as
bipartite=1
Basically if two nodes belonging to different sets have the same number a lot of confusion seems to arise, especially in terms of an hypothetical one mode projection.