Skip to content

Commit efdad4a

Browse files
authored
Merge pull request #1186 from Kaggle/add-openpyxl
Add openpyxl
2 parents 6a2edca + 0393f41 commit efdad4a

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Dockerfile.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ RUN pip install flashtext && \
514514
pip install pandarallel && \
515515
pip install onnx && \
516516
pip install tables && \
517+
pip install openpyxl && \
517518
/tmp/clean-layer.sh
518519

519520
# Download base easyocr models.

tests/test_openpyxl.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import unittest
2+
3+
import pandas as pd
4+
from pandas.testing import assert_frame_equal
5+
6+
7+
class TestPandasOpenPyXL(unittest.TestCase):
8+
9+
def test_rw_excel(self):
10+
want = pd.DataFrame([[1, 10, 'a']], columns=['x', 'y', 'z'])
11+
want.to_excel('./want.xlsx', index=False, engine="openpyxl")
12+
got = pd.read_excel('./want.xlsx', engine="openpyxl")
13+
assert_frame_equal(want, got)

0 commit comments

Comments
 (0)