title: how to create a summary matrix of values, for dummy variables, and their combination
body: <p>I have a <code>pandas</code> data frame:</p>
  
  <pre><code>    import pandas as pd
  
         df = pd.DataFrame({'dummy_1' : [0, 0, 0, 1, 1, 0],
                            'dummy_2' : [1, 1, 0, 0, 1, 1],
                            'dummy_3' : [1, 1, 1, 0, 0, 0]})
  </code></pre>
  
  <p>What I would to have in the end, is a "type of correlation matrix", but instead of correlations, having "how many <code>ones (1s)</code> each other variable has, for the <code>ones (1s)</code> of every variable.</p>
  
  <p>So in my example the matrix should look like this</p>
  
  <pre><code>        dummy_1 dummy_2 dummy_3
  dummy_1   2/6     1/6     0/6
  dummy_2           4/6     2/6
  dummy_3                   3/6
  </code></pre>
  
  <p>This matrix, is symmetrical, that's why I wrote only the upper diagonal elements</p>