Skip to content

Update documentation on pd.read_excel, to reflect the fact that support for OpenDocument files is available #28231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
marcelonp opened this issue Aug 30, 2019 · 1 comment · Fixed by #28245
Labels

Comments

@marcelonp
Copy link

class ExcelFile:
    """
    Class for parsing tabular excel sheets into DataFrame objects.
    Uses xlrd. See read_excel for more documentation

    Parameters
    ----------
    io : string, path object (pathlib.Path or py._path.local.LocalPath),
        file-like object or xlrd workbook
        If a string or path object, expected to be a path to xls or xlsx file.
    engine : string, default None
        If io is not a buffer or path, this must be set to identify io.
        Acceptable values are None or ``xlrd``.
    """

    from pandas.io.excel._odfreader import _ODFReader
    from pandas.io.excel._openpyxl import _OpenpyxlReader
    from pandas.io.excel._xlrd import _XlrdReader

    _engines = {"xlrd": _XlrdReader, "openpyxl": _OpenpyxlReader, "odf": _ODFReader}

Problem description

I was searching for support for reading .ods files, and upon reading the documentation for read_excel and IO related functions, I found nothing.

When I was about to search for another library, I discovered that support had already been added to the read_excel function (as of #2311), but the docs weren't updated, either in ExcelFile, or in the read_excel function, and as suggested when creating the issue https://pandas-docs.github.io/pandas-docs-travis/ also wasn't. I also didn't find any related issue regarding this.

I might be missing something, since it is my first issue, sorry about that if it's the case.

I'd suggest even something along the lines of:

    Parameters
    ----------
    io : string, path object (pathlib.Path or py._path.local.LocalPath),
        file-like object or xlrd workbook
        If a string or path object, expected to be a path to xls or xlsx file.
    engine : string, default None
        If io is not a buffer or path, this must be set to identify io.
        Acceptable values are None, ``xlrd``, ``openpyxl`` or ``odf``.
        Note that ``odf`` reads tables out of OpenDocument formatted files.
    """

for both ExcelFile and read_excel. That would make visible that support for other engines is available.

Thanks.

@marcelonp marcelonp changed the title Update documentation on pd.read_excel, to reflect the fact that engines other than xlrd are available Update documentation on pd.read_excel, to reflect the fact that support for OpenDocument files is available Aug 30, 2019
@WillAyd
Copy link
Member

WillAyd commented Aug 30, 2019

Makes sense - would certainly take a PR if you'd like to try one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants