title: Networkx not reading in data correctly
body: <p>I am trying to read in an edgelist that I have created but the weight values are not being read in correctly by networkx and I am unsure why. I originally did it as a .edgelist file with spaces as seperators and used this line</p>
  
  <pre><code>elephG = nx.read_edgelist('elephant.edgelist', nodetype=str, create_using=nx.DiGraph(), data=(('weight',int),))
  </code></pre>
  
  <p>This worked perfectly fine and everything was read in, however I needed to then make a graph that was a combination of multiple graphs (The same thing just with a lot more edges) This is where problems arose. I noticed that the degrees where not totaling up properly. I took a look at the edges using: </p>
  
  <pre><code>allG.in_edges('China', data=True)
  </code></pre>
  
  <p>and some of the edge values are indeed being read in wrong. Does anyone know why this would be? I tried manipulating the file from a txt file to a edgelist file to a csv file but all the formats read it wrong. </p>
  
  <p>Here is what I am currently doing</p>
  
  <pre><code>#Make a master graph
  allG = nx.read_edgelist('master.csv',  delimiter=",", create_using=nx.DiGraph(), data=(('weight',int),))
  allG.in_edges('China', data=True)
  </code></pre>
  
  <p>I also noticed that when I delete a large portion of the lines from the end, it begins to read in weights correctly again (I only have 167 lines btw, so its by no means super massive)</p>
  
  <p>I cant post the whole thing as its rather large but here is a snippit of the output as well as the beginning of the file </p>
  
  <p>Output: 
  <code>InEdgeDataView([('South_Africa', 'China', {'weight': 3}), ('Belgium', 'China', {'weight': 1}), ('France', 'China', {'weight': 1}), ('Germany', 'China', {'weight': 1}), ('Hong_Kong', 'China', {'weight': 5}), ('India', 'China', {'weight': 9}),</code></p>
  
  <p>File: <code>South_Africa,Vietnam,20
  South_Africa,China,15
  South_Africa,Mozambique,12
  South_Africa,Thailand,4
  South_Africa,Malaysia,1
  South_Africa,Hong_Kong,1
  Cambodia,Vietnam,1
  Belgium,China,1
  Belgium,Ireland,1
  Belgium,South_Korea,1
  Belgium,Taiwan,1
  China,Vietnam,1
  China,Hong_Kong,1
  Czech_Republic,Ireland,1
  Ethiopia,Thailand,2
  France,China,1
  France,Vietnam,1
  France,Ireland,1
  Germany,South_Korea,1
  Germany,Taiwan,1
  Germany,China,1
  Guinea,Uganda,1
  Hong_Kong,Vietnam,2
  Hong_Kong,China,2
  India,Vietnam,5
  India,China,1</code></p>
  
  <p>As you can see the first and last two weights of china have been read incorrectly.</p>