Read ODS files into a pandas DataFrame while preserving direct formatting (bold, italic, underline) as markup (AsciiDoc, Markdown, HTML).
Project description
direct-formatting-pandas-ods-reader
Inspired from pandas-ods-reader, but with the ability to read direct formatting. pandas-ods-reader relies on ezodf to extract cell content, but ezodf ignores direct formatting, so we need to go at a lower level.
The direct formatting is turned into markup in the resulting pandas DataFrame.
Dependencies
lxmlpandas
Usage
from direct_formatting_pandas_ods_reader import read_ods
read_ods("test/test.ods")
read_ods("test/test.ods", format="markdown")
read_ods("test/test.ods", format="html", sheet=0)
The format argument can be either html, markdown or asciidoc, and defaults to asciidoc. There is also a sheet argument that defaults to 0, which corresponds to the first sheet of the file.
License
Licensed under the GNU GPL v3.0, Yann Trividic.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file direct_formatting_pandas_ods_reader-0.1.0.tar.gz.
File metadata
- Download URL: direct_formatting_pandas_ods_reader-0.1.0.tar.gz
- Upload date:
- Size: 43.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3eec47e871524360b0a6db3c6d3d0feee553a65e1bc2d26e8aed3c41241bc186
|
|
| MD5 |
9b28e6d88c9a4eb24d6435e4a0d610df
|
|
| BLAKE2b-256 |
913e777a25e2f92d662b81f7e34f7aa95030b1c1e02813af64ff720b44b14ef7
|
File details
Details for the file direct_formatting_pandas_ods_reader-0.1.0-py3-none-any.whl.
File metadata
- Download URL: direct_formatting_pandas_ods_reader-0.1.0-py3-none-any.whl
- Upload date:
- Size: 31.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1871e82d1712aba21f9f5d7e1160bf0eb0bf10cff656fe94b667e57991448141
|
|
| MD5 |
1a9fc94b5f9c71607092a05555fdcdcc
|
|
| BLAKE2b-256 |
a7f77515d5095506c2c73516b12ec6b6537d655718b650ee7e4141119481dea0
|