pandas.ExcelFile 您所在的位置:网站首页 pandasapi pandas.ExcelFile

pandas.ExcelFile

2023-04-11 08:08| 来源: 网络整理| 查看: 265

path_or_bufferstr, bytes, path object (pathlib.Path or py._path.local.LocalPath),

A file-like object, xlrd workbook or openpyxl workbook. If a string or path object, expected to be a path to a .xls, .xlsx, .xlsb, .xlsm, .odf, .ods, or .odt file.

enginestr, default None

If io is not a buffer or path, this must be set to identify io. Supported engines: xlrd, openpyxl, odf, pyxlsb Engine compatibility :

xlrd supports old-style Excel files (.xls).

openpyxl supports newer Excel file formats.

odf supports OpenDocument file formats (.odf, .ods, .odt).

pyxlsb supports Binary Excel files.

Changed in version 1.2.0: The engine xlrd now only supports old-style .xls files. When engine=None, the following logic will be used to determine the engine:

If path_or_buffer is an OpenDocument format (.odf, .ods, .odt), then odf will be used.

Otherwise if path_or_buffer is an xls format, xlrd will be used.

Otherwise if path_or_buffer is in xlsb format, pyxlsb will be used.

New in version 1.3.0.

Otherwise if openpyxl is installed, then openpyxl will be used.

Otherwise if xlrd >= 2.0 is installed, a ValueError will be raised.

Warning

Please do not report issues when using xlrd to read .xlsx files. This is not supported, switch to using openpyxl instead.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有