title: Read weighted graph using "igraph" in python
body: <p>I need read an weighted graph from external file</p>
  
  <p>In other posts is recommended to use ncol, but I tried "ncol" format and not work:</p>
  
  <pre><code>g = igraph.Graph.Read_Ncol("small.ncol")
  for vertex in g.vs():
      print vertex["weight"]
  </code></pre>
  
  <p>small.ncol</p>
  
  <pre><code>0   1   0.47
  2   0   0.67
  2   1   0.94
  3   0   0.98
  3   1   0.05
  3   2   0.24
  4   0   0.12
  4   1   0.22
  4   2   0.36
  4   3   0.69
  5   0   0.82
  6   5   0.97
  7   5   0.43
  7   6   0.83
  8   5   0.44
  8   6   0.49
  8   7   0.39
  9   5   0.37
  9   6   0.55
  9   7   0.73
  9   8   0.68
  10  0   0.34
  11  10  0.22
  12  11  0.40
  13  12  0.78
  14  10  0.59
  14  13  0.81
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Traceback (most recent call last):
    File "stackoverflow.py", line 54, in &lt;module&gt;
      print vertex["weight"]
  KeyError: 'Attribute does not exist'
  </code></pre>
  
  <p>I tried to read weighted graph from Nexus:</p>
  
  <p>E.g: This is a weighted graph: <a href="http://nexus.igraph.org/api/dataset_info?format=xml&amp;id=1" rel="nofollow">http://nexus.igraph.org/api/dataset_info?format=xml&amp;id=1</a></p>
  
  <pre><code>&lt;id&gt;1&lt;/id&gt;
  &lt;sid&gt;karate&lt;/sid&gt;
  &lt;tags&gt;
      &lt;tag&gt;social network&lt;/tag&gt;
      &lt;tag&gt;undirected&lt;/tag&gt;
      **&lt;tag&gt;weighted&lt;/tag&gt;**
  &lt;/tags&gt;
  </code></pre>
  
  <p>But too not work:</p>
  
  <pre><code>g = igraph.Nexus.get("karate")
  for vertex in g.vs():
      print vertex["weight"]
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Traceback (most recent call last):
    File "stackoverflow.py", line 54, in &lt;module&gt;
      print vertex["weight"]
  KeyError: 'Attribute does not exist'
  </code></pre>
  
  <p>I dont know how read a weighted graph, someone could help?</p>