pydata/pandas — pull request #7029 by mcwitt (2014-05-03 20:04:50+00:00)
Title: BUG: fix reading multi-index data in python parser

Partial fix for #6893

The python parser has a problem reading data with a multi-index specified in the row following the header, for example

```python
In [3]: 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 [4]: pd.read_table(StringIO(text), sep='\s+', engine='python')
Out[4]:
E
one two three four
a b 10.0032 5 0.3640
q 20.0000 4 0.1744
x q 30.0000 3 2.5838

[3 rows x 1 columns]
```

(the C parser doesn't make it this far, see #6893)

This PR fixes the bug in the python parser:

```python
In [4]: pd.read_table(StringIO(text), sep='\s+', engine='python')
Out[4]:
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

[3 rows x 5 columns]
```