Skip to main content

Read ODS files into a pandas DataFrame while preserving direct formatting (bold, italic, underline, superscript, subscript, and anchors) 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 (italic, bold, underline, subscript, superscript, and anchors) formatting is turned into markup in the resulting pandas DataFrame.

Dependencies

  • lxml
  • pandas

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

direct_formatting_pandas_ods_reader-0.3.0.tar.gz (44.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file direct_formatting_pandas_ods_reader-0.3.0.tar.gz.

File metadata

File hashes

Hashes for direct_formatting_pandas_ods_reader-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8f49d1d7eeecec2507c65ce73ba6753b4b6f3d4d12f8b32856a14c856708f3aa
MD5 ba248c4e2e94767ad0b5e53c7ba1130b
BLAKE2b-256 2230e2c6fe980d6a1f24686199ed3c78f60b275c9c51758b281775dd69b00298

See more details on using hashes here.

File details

Details for the file direct_formatting_pandas_ods_reader-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for direct_formatting_pandas_ods_reader-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d70a5fe74aea8c1709fef079207e66804bb4bfd478ade2c99fa5a82d32fdf0b
MD5 231db7b8c3993fb8ba48ac69c8c45898
BLAKE2b-256 5115f2fc8bf5fe68bb45ae275fa6ccf5c3ad6993dd81c9750872f94fbd0c5667

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page