title: Reading data from text file with missing values
body: <p>I want to read data from a file that has many missing values, as in this example:</p>
  
  <pre><code>1,2,3,4,5
  6,,,7,8
  ,,9,10,11
  </code></pre>
  
  <p>I am using the numpy.loadtxt function:</p>
  
  <pre><code>data = numpy.loadtxt('test.data', delimiter=',')
  </code></pre>
  
  <p>The problem is that the missing values break loadtxt (I get a <em>"ValueError: could not convert string to float:"</em>, no doubt because of the two or more consecutive delimiters). </p>
  
  <p>Is there a way to do this automatically, with loadtxt or another function, or do I have to bite the bullet and parse each line manually?</p>