title: Python - How to convert the matrix (made from pandas) into list?
body: <p>I have created the jaccard similarities (refer to this post-> <a href="https://stackoverflow.com/questions/37003272/how-to-compute-jaccard-similarity-from-a-pandas-dataframe">How to compute jaccard similarity from a pandas dataframe</a>)</p>
  
  <pre><code>            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    
  </code></pre>
  
  <p>the matrix that shown above is also referring to the referent post. </p>
  
  <p>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 </p>
  
  <p>i expected to see the result as </p>
  
  <pre><code>([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)
  </code></pre>
  
  <p>thank you in advanced</p>