pydata/pandas — pull request #8290 by onesandzeroes (2014-09-17 11:19:57+00:00)
Title: BUG: DataFrame.to_html() fails when index=False and max_rows is specified

This addresses #8273, but it doesn't actually fully fix the issue, since the same bug still occurs when we have a MultiIndex. I've got a fix for the single-index case, and I'm not sure if I have time to decipher what's happening with hierarchical indexes right now. I'll open a new issue for the MultiIndex case if that's OK, having a MultiIndexed dataframe and then not printing the index seems like a bit of an edge case to me anyway.

```python
import pandas as pd
import numpy as np

df = pd.DataFrame({'a': np.arange(0, 10), 'b': np.arange(9, -1, -1)})
df.to_html(max_rows=3, index=False)
```

now produces:

a
b

0
9

...
...

9
0

as expected.