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

pipeline status

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.4.tar.gz (44.6 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.4.tar.gz.

File metadata

File hashes

Hashes for direct_formatting_pandas_ods_reader-0.3.4.tar.gz
Algorithm Hash digest
SHA256 d2a587c0a1ca5b3f4da3e7194cd12ac19422903cca5bb15a6213187b49cbfb2a
MD5 8c8280e5f91356696c87196954c086e1
BLAKE2b-256 50feef275cb34f4f13a90f0d73bd403bc8d0ba4c3d70b846f97396b51b733079

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for direct_formatting_pandas_ods_reader-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9d8c5f9e92ca8aca8e02ae93dc841d497d4a9945881cb966f14c96027a22af7e
MD5 7d3d7c3af2ae8634508a1ee5931993ec
BLAKE2b-256 d99d04882b421abeaccc42547bc1576e0e162a205abc1ff614f59a83f34ecf49

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