Skip to content

Commit 1e91282

Browse files
committed
Add test_trailing_blanks, which currently fails
1 parent 714f7d7 commit 1e91282

File tree

6 files changed

+9
-0
lines changed

6 files changed

+9
-0
lines changed
2.99 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
8.62 KB
Binary file not shown.
Binary file not shown.

pandas/tests/io/excel/test_readers.py

+9
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,15 @@ def test_multiheader_two_blank_lines(self, read_ext):
12041204
)
12051205
tm.assert_frame_equal(result, expected)
12061206

1207+
def test_trailing_blanks(self, read_ext):
1208+
"""
1209+
Sheets can contain blank cells with no data. Some of our readers
1210+
were including those cells, creating many empty rows and columns
1211+
"""
1212+
file_name = "trailing_blanks" + read_ext
1213+
result = pd.read_excel(file_name)
1214+
assert result.shape == (3, 3)
1215+
12071216

12081217
class TestExcelFileRead:
12091218
@pytest.fixture(autouse=True)

0 commit comments

Comments
 (0)