title: Building a huge weighted network with networkx in python
body: <p>I have a huge number of dictionaries in the format</p>
  
  <pre><code>d1={'el1':2, 'el3':4, ...,'el12':32}
  d2={'el3':5, 'el4':6, ...,'el12':21}
  </code></pre>
  
  <p>I want to create a single network using networkx in which: every node is one of the keys of the dictionaries that has an attribute that represents the sum of all the values of the node (for example, it would be 9 for el3 considering the two given dictionaries), and there is an edge between two nodes if they appear together in the same dictionary, with a weight attribute equal to the number of times they appear together (for instance it would be 2 for el3 and el12, as they appear together in 2 dictionaries).</p>
  
  <p>I know how to create networks and how to add attributes to nodes and edges in networkx, but I am looking for an efficient way, as I have about 12.000 of those dictionaries.</p>