title: Pandas read csv without header (which might be there)
body: <p>I'm trying to read a <code>.csv</code> file in chunks (python-engine) and skip the header (or any lines starting with a comment character). It is not known <em>a priori</em> if the file has a header or not, so it is not possible to just skip the first line, since it might already be a data row.</p>
  
  <p>Setting <code>header=None</code> does solve the problem. If I invoke <code>get_chunk</code> and want the row values, I still get the header/or comment line.</p>
  
  <p>Desired output would be just the same like <code>numpy.loadtxt()</code></p>
  
  <p>The code below demonstrates what's going on:</p>
  
  <pre><code>import numpy as np
  from pandas.io.parsers import TextFileReader
  fn = '/tmp/test.csv'
  np.savetxt(fn, np.arange(300).reshape(100,3), header="makes no sense")
  print np.loadtxt(fn).shape # output (100,3)
  
  reader = TextFileReader(fn, chunksize=10, header=None)
  reader.get_chunk().values
  
  # output
  array([['#', 'makes', 'no', 'sense'],
         ['0.000000000000000000e+00', '1.000000000000000000e+00',
          '2.000000000000000000e+00', None],
         ['3.000000000000000000e+00', '4.000000000000000000e+00',
          '5.000000000000000000e+00', None],
         ['6.000000000000000000e+00', '7.000000000000000000e+00',
          '8.000000000000000000e+00', None],
         ['9.000000000000000000e+00', '1.000000000000000000e+01',
          '1.100000000000000000e+01', None],
         ['1.200000000000000000e+01', '1.300000000000000000e+01',
          '1.400000000000000000e+01', None],
         ['1.500000000000000000e+01', '1.600000000000000000e+01',
          '1.700000000000000000e+01', None],
         ['1.800000000000000000e+01', '1.900000000000000000e+01',
          '2.000000000000000000e+01', None],
         ['2.100000000000000000e+01', '2.200000000000000000e+01',
          '2.300000000000000000e+01', None],
         ['2.400000000000000000e+01', '2.500000000000000000e+01',
          '2.600000000000000000e+01', None]], dtype=object)
  </code></pre>
  
  <p>If I specify the comment char via</p>
  
  <pre><code>   reader = TextFileReader(fn, chunksize=10, header=None, comment='#')
  </code></pre>
  
  <p>I get an exception:</p>
  
  <pre><code>In [99]: reader = pandas.io.parsers.TextFileReader('/tmp/test.csv', chunksize=10, header=None, index_col=False, comment="#")
  ---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-99-64b1c0bce4ef&gt; in &lt;module&gt;()
  ----&gt; 1 reader = pandas.io.parsers.TextFileReader('/tmp/test.csv', chunksize=10, header=None, index_col=False, comment="#")
  
  /home/marscher/anaconda/lib/python2.7/site-packages/pandas/io/parsers.pyc in __init__(self, f, engine, **kwds)
      560             self.options['has_index_names'] = kwds['has_index_names']
      561 
  --&gt; 562         self._make_engine(self.engine)
      563 
      564     def _get_options_with_defaults(self, engine):
  
  /home/marscher/anaconda/lib/python2.7/site-packages/pandas/io/parsers.pyc in _make_engine(self, engine)
      703             elif engine == 'python-fwf':
      704                 klass = FixedWidthFieldParser
  --&gt; 705             self._engine = klass(self.f, **self.options)
      706 
      707     def _failover_to_python(self):
  
  /home/marscher/anaconda/lib/python2.7/site-packages/pandas/io/parsers.pyc in __init__(self, f, **kwds)
     1400         # Set self.data to something that can read lines.
     1401         if hasattr(f, 'readline'):
  -&gt; 1402             self._make_reader(f)
     1403         else:
     1404             self.data = f
  
  /home/marscher/anaconda/lib/python2.7/site-packages/pandas/io/parsers.pyc in _make_reader(self, f)
     1505                 self.pos += 1
     1506                 self.line_pos += 1
  -&gt; 1507                 sniffed = csv.Sniffer().sniff(line)
     1508                 dia.delimiter = sniffed.delimiter
     1509                 if self.encoding is not None:
  
  /home/marscher/anaconda/lib/python2.7/csv.pyc in sniff(self, sample, delimiters)
      180 
      181         quotechar, doublequote, delimiter, skipinitialspace = \
  --&gt; 182                    self._guess_quote_and_delimiter(sample, delimiters)
      183         if not delimiter:
      184             delimiter, skipinitialspace = self._guess_delimiter(sample,
  
  /home/marscher/anaconda/lib/python2.7/csv.pyc in _guess_quote_and_delimiter(self, data, delimiters)
      221                       '(?:^|\n)(?P&lt;quote&gt;["\']).*?(?P=quote)(?:$|\n)'):                            #  ".*?" (no delim, no space)
      222             regexp = re.compile(restr, re.DOTALL | re.MULTILINE)
  --&gt; 223             matches = regexp.findall(data)
      224             if matches:
      225                 break
  
  TypeError: expected string or buffer
  </code></pre>
  
  <p><strong>Edit</strong> this error is caused by not wrapping comment in a list.</p>