diff --git a/ci/deps/actions-38-minimum_versions.yaml b/ci/deps/actions-38-minimum_versions.yaml index b41ea60600a9f..e44a3e0d70f4a 100644 --- a/ci/deps/actions-38-minimum_versions.yaml +++ b/ci/deps/actions-38-minimum_versions.yaml @@ -61,4 +61,4 @@ dependencies: - pip: - pyqt5==5.15.1 - - python-calamine==0.0.6 + - python-calamine==0.0.7 diff --git a/pandas/compat/_optional.py b/pandas/compat/_optional.py index b1b8dd370f4ec..16d5c17ea0331 100644 --- a/pandas/compat/_optional.py +++ b/pandas/compat/_optional.py @@ -34,7 +34,7 @@ "pyarrow": "6.0.0", "pyreadstat": "1.1.2", "pytest": "7.0.0", - "python-calamine": "0.0.6", + "python-calamine": "0.0.7", "pyxlsb": "1.0.8", "s3fs": "2021.08.0", "scipy": "1.7.1", diff --git a/pandas/io/excel/_calaminereader.py b/pandas/io/excel/_calaminereader.py index af7d2016648c6..a72bc03957a59 100644 --- a/pandas/io/excel/_calaminereader.py +++ b/pandas/io/excel/_calaminereader.py @@ -99,7 +99,7 @@ def _convert_cell(value: ValueT) -> Scalar: from python_calamine import get_sheet_data - rows = get_sheet_data(self.book, sheet) + rows = get_sheet_data(self.book, sheet, skip_empty_area=False) data: list[list[Scalar]] = [] for row in rows: diff --git a/pandas/tests/io/excel/test_readers.py b/pandas/tests/io/excel/test_readers.py index cec4e636db400..d5b52b062e034 100644 --- a/pandas/tests/io/excel/test_readers.py +++ b/pandas/tests/io/excel/test_readers.py @@ -901,9 +901,9 @@ def test_corrupt_bytes_raises(self, engine): "record; found b'foo'" ) elif engine == "calamine": - import python_calamine + from python_calamine import CalamineError - error = python_calamine._python_calamine.CalamineError + error = CalamineError msg = "Cannot detect file format" else: error = BadZipFile @@ -1797,9 +1797,9 @@ def test_corrupt_files_closed(self, engine, read_ext): errors = (BadZipFile, xlrd.biffh.XLRDError) elif engine == "calamine": - import python_calamine + from python_calamine import CalamineError - errors = (python_calamine._python_calamine.CalamineError,) + errors = (CalamineError,) with tm.ensure_clean(f"corrupt{read_ext}") as file: Path(file).write_text("corrupt") diff --git a/pyproject.toml b/pyproject.toml index 01c0a0cd9e9cf..5fada3523c781 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,7 +104,7 @@ all = ['beautifulsoup4>=4.9.3', 'pytest>=7.0.0', 'pytest-xdist>=2.2.0', 'pytest-asyncio>=0.17.0', - 'python-calamine>=0.0.6', + 'python-calamine>=0.0.7', 'python-snappy>=0.6.0', 'pyxlsb>=1.0.8', 'qtpy>=2.2.0',