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

2
  • Something like NetworkX DiGraph create subgraph (DiGraph) by node? Commented Sep 28, 2021 at 2:07
  • @HenryEcker Thanks for the response, however, this is either predecessor or successor, I wanted those that are within the same network. Thanks Commented Oct 7, 2021 at 6:29

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.