Skip to main content

Generate Typst Tables from DataFrames.

Project description

typ-tables

Inspired by great-tables, a way to turn DataFrames into Typst tables.

To install, run uv add typ-tables

Tables that look like

rendered table

Created using the following Python script:

import polars as pl
from typ_tables import TypTable

df = pl.DataFrame(
    {
        "string": ["a", "b", "c"],
        "int": [10, 10000, 1000000],
        "float": [0.000001, 0.1368753, 163985.8374],
    }
)

table = TypTable(df)
result: str = table.to_typst()

To include the table in your Typst report you can write the resulting Typst string to a file and include it.

#include "table.typ"

Documentation

For more, check out the documentation. The great_tables documentation is also useful as many of the examples work in typ-tables.

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

typ_tables-0.3.0.tar.gz (79.3 kB view details)

Uploaded Source

Built Distribution

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

typ_tables-0.3.0-py3-none-any.whl (48.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: typ_tables-0.3.0.tar.gz
  • Upload date:
  • Size: 79.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"20.04","id":"focal","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for typ_tables-0.3.0.tar.gz
Algorithm Hash digest
SHA256 93df194e8a5024e5558f12a7b8f68aa325c11f2c0655e5cc279867e24d32ea9c
MD5 4ea124b9c6ed14baff4bc7c89ae0e7c4
BLAKE2b-256 623a2cc7a018c63a1b32c46b60c930568e3e6472d3d4b1d150488c1e6026e9e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: typ_tables-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 48.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"20.04","id":"focal","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for typ_tables-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc5278c248b7e8b5cd991fbef27cff3066f835144065d1fd3306c57c97d0c69a
MD5 f2a75c797d53f57b6b74107030caa8a8
BLAKE2b-256 17a349ebf1a8a81a844b60700596873636214bbb4dacc14dadf50bb6b292d227

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