Creating a directed graph using datafile
#define data data = r'datafilepath' #Creating a directed graoh G = nx.read_edgelist(data, nodetype = str, create_using = nx.Digraph(), \ data = (('weight',float),))