title: How to export the result of eigenvector_centrality as csv file of networkx in python 2.7?
body: <p>I am new to python and try to use networkx to compute the <code>eigenvector_centrality</code> of a graph which is a file.csv like this:</p>
  
  <pre><code>erwr,dfas,3
  rfrf,g2rf,5
  fewe,fef2,2
  </code></pre>
  
  <p>First two columns as nodes and the third column as the weight of the edge.</p>
  
  <p>I ran following code to get the result of <code>eigenvector_centrality</code> of the graph:</p>
  
  <pre><code>python
  import networkx as nx
  G = nx.read_weighted_edgelist("file.csv", delimiter=",") 
  G.edges(data=True)
  centrality = nx.eigenvector_centrality(G)
  print(['%s %0.2f'%(node,centrality[node]) for node in centrality])
  </code></pre>
  
  <p>And I was wondering how to export the result of <code>eigenvector_centrality</code> as result.csv file has following format:</p>
  
  <pre><code>erwr,0.42
  rfrf,0.38
  fewe,0.32
  </code></pre>
  
  <p>first column as nodes and the second column as its centrality? I am using ubuntu and python2.7</p>
  
  <p>Thx ahead!</p>