title: NetworkX Graph attributes in a single table
body: <p>I am trying to create a table displaying the attributes of nodes in a NetworkX (using Python) graph. The functions used to get these attributes generate a list of the nodes with their assigned attribute and are generated like in the following:</p>
  <pre><code>import networkx as nx
  
  # degrees of nodes
  pprint(g.degree())
  
  # clustering coefficient
  pprint(nx.clustering(g))
  </code></pre>
  <p>I should like to be able to compile these into a table with intuitive overview in the following format:</p>
  <pre><code>node    degree    clustering coefficient
  ----------------------------------------
  a       2         3
  b       1         1
  ...
  </code></pre>
  <p>Any tips on how to do so? Perhaps using a dict and tabulate but I am not quite sure... Would be grateful for any tips!</p>
  <p><strong>Edit</strong>
  I found a way to do some simple printing, but it isn't formatted very nicely and doesn't make for nice syntax:</p>
  <pre><code>for n in g.nodes():
      print(n, g.degree(n), nx.clustering(g, n))
  </code></pre>