I am working to develop a network graph that shows the data flow between systems. The network is still being built out, but the goal is to visualize the data flows. In the example below, you can see the Source system, Target system and Payload item. The nulls are purposeful, as portions of the network are still under construction. I would like to be able to capture disconnected nodes (ie Source system Charlie) and incomplete data flows (ie Source system Foxtrot and Target system Delta).
Source | Payload | Target |
---|---|---|
Alpha | foo | Bravo |
Bravo | bar | Charlie |
cat | Delta | |
Echo | dog | Alpha |
Foxtrot | hat |
What I have developed so far creates a node for null as an empty string. Sample code
df = pd.read_csv('X.csv',keep_default_na=False)
G = nx.from_pandas_edgelist(df=df, source='SOURCE',target='TARGET', edge_attr=True, create_using=nx.MultiDiGraph())
nx.draw(G, with_labels=True)
plt.show()
I would like Delta and Foxtrot to be disconnected nodes. I would also like the Edges to be labeled with the Payload but that's a nice to have.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.