title: Construct co-occurrence matrix from a list of list in python
body: <p>Suppose we have n lists consisting of some values.</p>
  
  <pre><code>['a', 'b']
  ['b', 'c', 'd', 'e']
  ['a', 'd', 'e']
  ['b', 'e']
  </code></pre>
  
  <p>Here n = 4.</p>
  
  <p>This should yield a dataframe like the below one</p>
  
  <pre><code>      'a'  'b'  'c'  'd'  'e'
  'a'    0    1    0    1    1
  'b'    1    0    1    1    2
  'c'    0    1    0    1    1
  'd'    1    1    1    0    2
  'e'    1    2    1    2    0
  </code></pre>