pandas-ods-reader
Provides a function to read in a .ods or .fods file and returns a pandas DataFrame.
It uses ezodf to read in .ods files. Since .fods files are essentially xml, lxml is used to read them. The correct parser is automatically chosen based on the file's extension.
If a range is specified in the sheet to be imported, it seems that ezodf imports empty cells as well. Therefore, completely empty rows and columns are dropped from the DataFrame, before it is returned. Only trailing empty rows and columns are dropped.
If the ODS file contains duplicated column names, they will be numbered and the number is appended to the column name in the resulting DataFrame.
Dependencies
ezodflxmlpandas
Installation
pip install pandas-ods-reader
Usage
from pandas_ods_reader import read_ods
path = "path/to/file.ods"
# by default the first sheet is imported
df = read_ods(path)
# load a sheet based on its index (1 based)
sheet_idx = 2
df = read_ods(path, sheet_idx)
# load a sheet based on its name
sheet_name = "sheet1"
df = read_ods(path, sheet_name)
# load a file that does not contain a header row
# if no columns are provided, they will be numbered
df = read_ods(path, 1, headers=False)
# load a file and provide custom column names
# if headers is True (the default), the header row will be overwritten
df = read_ods(path, 1, columns=["A", "B", "C"])
Metadata
Release files for pandas-ods-reader 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pandas_ods_reader-0.2.0.tar.gz | 5.5 kB | Without provenance | Details for pandas_ods_reader-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pandas_ods_reader-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pandas_ods_reader-0.2.0-py3-none-any.whl |
Total release size: 12.8 kB
Release files / pandas_ods_reader-0.2.0.tar.gz
| Download URL | pandas_ods_reader-0.2.0.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db8daec5c71fcc524430b63fe41eda7453c18d7edcb54abf71d87b435d448790
|
|
BLAKE2b-256 checksum How to use checksums |
01ddbf8ae18baab4642ee980af85e04a27dff65686bbaef9ab8cfdb4ed238377
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.1 Linux/6.6.31_1
|
Release files / pandas_ods_reader-0.2.0-py3-none-any.whl
| Download URL | pandas_ods_reader-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28ef4cedabd870dd8c2b0ba593a7d20192f571aa33ba7ae72a8de77e7380e901
|
|
BLAKE2b-256 checksum How to use checksums |
ee537931cc396915593359d00bd3ed03f1250e3e2c5a97b587bf8b1705f864da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.1 Linux/6.6.31_1
|
Security for pandas-ods-reader 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.