I have created the jaccard similarities (refer to this post-> How to compute jaccard similarity from a pandas dataframe)
Unnamed A B C D
Unnamed 1 0.05 0.05 0.05 0.05
A 0.05 1 0.99 0.99 0.99
B 0.05 0.99 1 0.99 0.99
C 0.05 0.99 0.99 1 0.99
D 0.05 0.99 0.99 0.99 1
the matrix that shown above is also referring to the referent post.
my question is I would like to know how to convert this matrix into pair or list? because i will use the data in the form of list or pair for creating the network
i expected to see the result as
([unnamed, unnamed], 1)
([unnamed, A], 0.05)
([unnamed, B], 0.05)
([unnamed, C], 0.05)
([unnamed, D], 0.05
([A, unnamed], 0.05)
([A,A], 1)
([A,B], 0.99)
([A,C], 0.99)
([A,D], 0.99)
.
.
.
([D,Unnamed], 0.05)
([D,A], 0.99)
([D,B], 0.99)
([D,C], 0.99)
([D,D], 1)
thank you in advanced