This is an extension of a previous question that I asked on this forum. I have an excel file of vertex weights in the first column and their corresponding vertices in the second. The graph comes out as planned, but it is not a weighted graph, as I would expect from the following code:
data = Import["~/Desktop/OHD1.xlsx"]
Graph[Table[Property[data[[1]][[i, 2]], VertexWeight -> data[[1]][[i, 1]]], {i, 1, Length[data[[1]]]}],
Table[data[[2]][[i, 1]] \[UndirectedEdge] data[[2]][[i, 2]], {i, 1, Length[data[[2]]]}]]
How do I assign vertex weights? Any response is appreciated.
Attachments: