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"

TODO

  • Header spanners
  • Footnotes
  • Source notes
  • Summary rows
  • Better locale support
  • Pipe method

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.1.4.tar.gz (65.4 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.1.4-py3-none-any.whl (40.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: typ_tables-0.1.4.tar.gz
  • Upload date:
  • Size: 65.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.1.4.tar.gz
Algorithm Hash digest
SHA256 bd18bccffba9b243f1d34dae0484b624cefb19ec309f2ca3b498697e8e20244e
MD5 07921012471faa1e9e814b09f3eda70d
BLAKE2b-256 15af83c0bf27148e20c331e9dbb5c6edd5def266ae32abd562adac8b82854d86

See more details on using hashes here.

File details

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

File metadata

  • Download URL: typ_tables-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 40.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 177dac41c1b05c8498021bb92e6ece6fedd8a3556ef23ea61d4b2282554865f6
MD5 982ba5462ee97cce892f3c601a7b9224
BLAKE2b-256 d9e5ad990616ac3c0b1d63fd56371056d584095029d4c145b14eace91da0139d

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