I am new to Python and I try to make a 3D network graph using a csv file, with NetworkX and Plotly, I use Spring3D function and try to separate dimensions from the array wich was generated like in a tutorial i saw on Deepnote, but I am unable to do it probably because my nodes data arent read like integers, however i specified the nodetype int in my arguments... or maybe because i have to convert my data to matrix or array...(see my screens below), when I call one of my nodes it sends me back a Key Error, but it works when i call it like string spring_3D ['4'] , i dont know if this problem is linked to the fact that i can't assign my coordinates to my nodes but i suppose... I really don't know and i tried so many ways (like using different way of import my data with csv.reader and with open i was able to see my nodes like an integer with this method np.array([[int(e) for e in row] for row in csv.reader(f, delimiter=',')]) but it didnt work at the next step. I alos try to add nodes manually but unsucessfully... I even replace Num_nodes by G and i got Key error [1] I use the read.adjlist method but it s probably the same thing...I think the answer is probably pretty obvious... IS there someone who could help me to resolve this issue, even with a completely different approach, I will be gratefull Thanks in advance !
I work on python 3.6 with Jupyter notebook and Anaconda