pydata/pandas — pull request #7591 by mcwitt (2014-06-27 18:25:31+00:00)
Title: ENH: look for index columns in row after header

Closes #6893.

Currently the Python parser can read data with the index columns specified on the first line after the header, e.g.

```python
In [3]: pd.__version__
Out[3]: '0.14.0-271-gf8b101c'

In [4]: text = """ A B C D E
one two three four
a b 10.0032 5 -0.5109 -2.3358 -0.4645 0.05076 0.3640
a q 20 4 0.4473 1.4152 0.2834 1.00661 0.1744
x q 30 3 -0.6662 -0.5243 -0.3580 0.89145 2.5838"""

In [5]: pd.read_table(StringIO(text), sep='\s+', engine='python')
Out[5]:
A B C D E
one two three four
a b 10.0032 5 -0.5109 -2.3358 -0.4645 0.05076 0.3640
q 20.0000 4 0.4473 1.4152 0.2834 1.00661 0.1744
x q 30.0000 3 -0.6662 -0.5243 -0.3580 0.89145 2.5838
```

but the C parser fails:

```
In [6]: pd.read_table(StringIO(text), sep='\s+', engine='c')
---------------------------------------------------------------------------
CParserError Traceback (most recent call last)
. . .
CParserError: Error tokenizing data. C error: Expected 5 fields in line 3, saw 9
```

This PR patches the C parser to enable this feature.