'How to compute jaccard similarity from a pandas dataframe

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?

enter image description here

I created a placeholder dataframe listing product vs. product

data_ibs = pd.DataFrame(index=data_g.columns,columns=data_g.columns)

I am not sure how to iterate though data_ibs to compute similarities.

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)) :
.........


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source