How to compute jaccard similarity from a pandas dataframe
<p>I have a dataframe as follows: the shape of the frame is (1510, 1399). The columns represents products, the rows represents the values (0 or 1) assigned by an user for a given product. How can I can compute a jaccard_similarity_score?</p>

<p><a href="https://i.stack.imgur.com/8newK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8newK.png" alt="enter image description here"></a></p>

<p>I created a placeholder dataframe listing product vs. product </p>

<pre><code>data_ibs = pd.DataFrame(index=data_g.columns,columns=data_g.columns)
</code></pre>

<p>I am not sure how to iterate though data_ibs to compute similarities.</p>

<pre><code>for i in range(0,len(data_ibs.columns)) :
    # Loop through the columns for each column
    for j in range(0,len(data_ibs.columns)) :
.........
</code></pre>