Skip to content

to_html function fail when max_rows is specified #8273

Closed
@pilollipietro

Description

@pilollipietro

The error is:
list index out of range
Exception Location: /home/pietro/lod4statenv/local/lib/python2.7/site-packages/pandas/core/format.py in _write_body, line 923

In order to fix it I have replaced line 922 from:

for i in range(len(self.frame)):

to:

for i in range(min(len(self.frame), self.max_rows)):

Metadata

Metadata

Assignees

No one assigned

    Labels

    IO HTMLread_html, to_html, Styler.apply, Styler.applymapOutput-Formatting__repr__ of pandas objects, to_string

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions