I have a big csv file which lists connections between nodes in a graph. example:
0001,95784
0001,98743
0002,00082
0002,00091
So this means that node id 0001 is connected to node 95784 and 98743 and so on.
I need to read this into a sparse matrix in numpy. How can i do this?
I am new to python so tutorials on this would also help.
Example using lil_matrix (list of list matrix) of scipy.
Code:
Output: