title: Create Networkx Graph from CSV file
body: <p>I am trying to build a NetworkX social network graph from a <a href="https://github.com/MelissaLaurino/DolphinSocialNetwork_Laurino/blob/master/test.csv" rel="nofollow noreferrer">CSV file</a>. I am using Networkx 2.1 and Python 3</p>
  <p>I followed <a href="https://stackoverflow.com/questions/43561944/how-to-create-graph-using-networkx-from-text-file">this post</a> with no luck because I keep receiving the error:</p>
  <pre><code>AttributeError: 'list' object has no attribute 'decode'
  </code></pre>
  <p>My goal is to make the weights display thicker edges for the higher weights.</p>
  <p>Here is my code so far:</p>
  <pre><code>import networkx as nx
  import csv
  
  Data  = open('testest.csv', &quot;r&quot;, encoding='utf8')
  read = csv.reader(Data)
  Graphtype=nx.Graph()   # use net.Graph() for undirected graph
  
  G = nx.read_edgelist(read, create_using=Graphtype, nodetype=int, data=(('weight',float),))
  
  for x in G.nodes():
        print (&quot;Node:&quot;, x, &quot;has total #degree:&quot;,G.degree(x), &quot; , In_degree: &quot;, G.out_degree(x),&quot; and out_degree: &quot;, G.in_degree(x))   
  for u,v in G.edges():
        print (&quot;Weight of Edge (&quot;+str(u)+&quot;,&quot;+str(v)+&quot;)&quot;, G.get_edge_data(u,v))
  
  nx.draw(G)
  plt.show()
  </code></pre>
  <p>Is there a more simplified way to approach this? The data is relatively simple.</p>
  <p>Thank you for your help!</p>