The following dataframe
Node Target
Jennifer Maria
Luke Mark
Johnny Martin
Ludo Martin
Maria nan
Mark Luke
Mark Christopher
is used for building a network (where node is the source node):
G = nx.from_pandas_edgelist(edges, source='Node', target='Target')
I would like to list all the shortest path (if they exist) between the source node and nodes that are in a separate list:
list4path=['Christopher', 'Donna', 'Julian','Martin']
There are several options for calculating the shortest path in networkx (e.g., shortest_path), but I am wondering how I can get all the shortest path between each node and the several targets in the list4pth (the Target column needs only for building purpose).