0

I am quite new to Networkx and wanted to know how I can filter a node and draw a graph with all its connected components.

A sample example of my data is below:

From To amount
a b $200
a c $100
c a $400
b d $500
e f $200

For example if i want to see (or rather filter by "a") "a" with its connected component only, how can I draw it to get this output? Any help would be greatly appreciated.

enter image description here

  • Something like [NetworkX DiGraph create subgraph (DiGraph) by node](https://stackoverflow.com/q/32935510/15497888)? – Henry Ecker Sep 28 '21 at 02:07
  • @HenryEcker Thanks for the response, however, this is either predecessor or successor, I wanted those that are within the same network. Thanks – Gabriel Choo Oct 07 '21 at 06:29

0 Answers0