Let's say I have a .csv file containing the following:
Apple Banana
Apple Coconut
Banana Coconut
Coconut Apple
And these should mean directed edges between two nodes, like: Apple->Banana, Apple->Coconut, etc.
What is the proper method to use this kind of input in igraph?
This is what the Read_Ncol(f, names=True, weights="if_present", directed=True) function exactly does.
http://igraph.org/python/doc/igraph-pysrc.html#GraphBase.Read_Ncol
>>> from igraph import *
>>> g = Graph.Read_Ncol("stuff.csv", directed=True)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With