I have created a weighted edge list that I am trying to use to generate a weighted undirected graph:
The data is in a csv which looks like the following in excel:
node1 node2 weight
a b 0.1
a c 0.3
As recommended by other StackOverflow posts, I have been using the following code to read in the csv:
fh=open("<file_location>.csv", 'r')
G = nx.read_weighted_edgelist(fh,delimiter=',')
The first line runs fine but the second yields the error message:
TypeError: Failed to convert weight data weight to type type 'float'
If I check G, it has read in the nodes fine but not the weights, any ideas?