title: How to create network graph from dataframe?
body: <p>I stumbled upon this image representing deputies' voting patterns:
  <a href="https://i.stack.imgur.com/WPiiw.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WPiiw.jpg" alt="enter image description here"></a> </p>
  
  <p>From what I understand, deputies with similar voting patterns would be placed closer on the graph. </p>
  
  <p>Given I have tabular data with <code>name</code>, <code>vote</code>, and <code>vote_id</code> columns, <em>i) how do I create edges and nodes from it, ii) how do I create graph drawing from those edges and nodes?</em> </p>
  
  <p>I think I'll need to use <code>networkx</code> module once I transform the data, but I'm not sure how to create connections first. </p>
  
  <p>I'm sorry in advance if it's obvious, I only recently discovered network analysis.</p>
  
  <hr>
  
  <p>Some sample data if that helps:</p>
  
  <pre><code>  name        vote  vote_id
  0    A         yes        1
  1    A         yes        2
  2    B          no        1
  3    B  not voting        2
  4    C  not voting        1
  5    C          no        2
  6    D         yes        1
  7    D          no        2
  </code></pre>