Skip to content

ExcelFile(...).parse(skiprows=...) fails for rows at the end of the sheet #1843

Closed
@lodagro

Description

@lodagro

from mailinglist (tried it myself on master also)

I've been using the ExcelFile function to read in a dataset that has some lines of text above and below the numbers I'm interested in.

The option skiprows=[0,1,3,4,5,6,7] works fine to ignore the text above the data (apart from line 2, which contains the labels).

However, if I add values 151, 152, etc., to try to ignore the text lines after the end of the data, this seems to have no effect. Is this behavior deliberate?*

I can get rid of those extra lines at the end by using dropna(), but this seems to have the effect of making the first series of type object rather than float, which is (a little) inconvenient.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIO DataIO issues that don't fit into a more specific label

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions