python-calamine














































python-calamine



python-calamine
Python binding for beautiful Rust's library for reading excel and odf file - calamine.

Is used
calamine
pyo3
maturin
Installation
Currently, whl's builds are provided only for linux.

pip install python-calamine
Example
from python_calamine import get_sheet_data, get_sheet_names


get_sheet_names("file.xlsx")
# ['Page1', 'Page2']

get_sheet_data("file.xlsx")
# [
# ['1',  '2',  '3',  '4',  '5',  '6',  '7'],
# ['1',  '2',  '3',  '4',  '5',  '6',  '7'],
# ['1',  '2',  '3',  '4',  '5',  '6',  '7'],
# ]
Also, you can use monkeypatch for pandas for use this library as engine in read_excel().

from pandas import read_excel
from python_calamine.pandas import pandas_monkeypatch


pandas_monkeypatch()

read_excel("file.xlsx", engine="calamine")
#            1   2   3   4   5   6   7
# 0          1   2   3   4   5   6   7
# 1          1   2   3   4   5   6   7

Comments