TypeError issue when trying to Create a Graph

When I try to create a graph with my dataset that has dtype of int columns, it shows error of
" → 29 u, v = zip(*elist)
TypeError; zip argument #1 must support iteration"

I tried searching on StackOverFlow and also dgl queries page, I am doing Master’s , Need to complete my project asap, Please somebody help me

How did you create your graph? If you are working with pandas (seems so since you mentioned “dtype of int columns”) then you could try:

df = pd.DataFrame({'src': ..., 'dst': ...})
g = dgl.graph((df['src'], df['dst']))

I gave wrongly one parameter instead of two(u,v), I solved the problem, Thank you for your reply Mr.Barclayll

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.