Skip to content

DOC: Fix and extend ParserError docstring #22881

Closed
@cancan101

Description

@cancan101

ParserError says:

Exception that is raised by an error encountered in pd.read_csv

however, it seems to be raised at least by html parsing, and perhaps other parsers as well:

def test_computer_sales_page(self, datapath):
data = datapath('io', 'data', 'computer_sales_page.html')
with tm.assert_raises_regex(ParserError,
r"Passed header=\[0,1\] are "
r"too many rows for this "
r"multi_index of columns"):
self.read_html(data, header=[0, 1])
data = datapath('io', 'data', 'computer_sales_page.html')
assert self.read_html(data, header=[1, 2])

As higher level point, it would be great if the list of potential runtime exceptions raised by the the various parsers were documented in the docs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions