I know there is a method about how to use nodes list to creat a subgraph. But I want to know if there is a way to use edges to creat a subgraph. I now create a MultiDiGraph. Actually when I call print(G.edges(data = True)) the result is as bellowing:
[(1, 64, {'agent id': 1875}), (1, 64, {'agent id': 936}), (1, 75, {'agent id': 199}), (1, 75, {'agent id': 496}), (1, 4, {'agent id': 496}), (1, 81, {'agent id': 563}), (1, 459, {'agent id': 496})]
Now I want to create subgraphs for each "agent id", and how can I do? Thank you very much!