title: Python reading csv file using np.recfromcsv
body: <p>I have a csv file that needs to be read using np.recfromcsv. The problem i'm having is that one of the column is missing its name. You can see the csv file here: <a href="https://github.com/btel/visualization-talk/blob/master/Exercises/data/crabs.csv" rel="nofollow">https://github.com/btel/visualization-talk/blob/master/Exercises/data/crabs.csv</a>. The first column is missing its header name. When I read the file it with my code below, it gives me error:</p>
  
  <pre><code>File "prob1.py", line 11, in &lt;module&gt;
      main()
    File "prob1.py", line 7, in main
      data = np.recfromcsv('crabs.csv', delimiter=",", names=True)
    File "/Library/Python/2.7/site-packages/numpy-1.9.0-py2.7-macosx-10.9-intel.egg/numpy/lib/npyio.py", line 1904, in recfromcsv
      output = genfromtxt(fname, **kwargs)
    File "/Library/Python/2.7/site-packages/numpy-1.9.0-py2.7-macosx-10.9-intel.egg/numpy/lib/npyio.py", line 1686, in genfromtxt
      raise ValueError(errmsg)
  </code></pre>
  
  <p>I fixed the error by using the argument Names = None, what that does it it gives every column a default name from f0, f1 ... But I only want that when names are not provided for the column.</p>
  
  <p>My code can be seen below:</p>
  
  <pre><code>import numpy as np
  import matplotlib
  import matplotlib.pyplot as plt
  import matplotlib as mpl
  
  def main ():
      data = np.recfromcsv('crabs.csv', names=None)
      print data.dtype.fields
  
  if __name__ == '__main__':
      main()
  </code></pre>