Skip to main content

Add your description here

Project description

typ-tables

Inspired by great_tables, a way to turn DataFrames into Typst 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 = table.to_typst()

Which gives you the following typst snippet:

#table(
  columns: 3,
  column-gutter: (),
  row-gutter: (),
  stroke: none,
  align: (auto, auto, auto),
  inset: 0% + 5pt,
  table.header(table.cell(
  stroke: (bottom: 1.2pt),
  [string],
), table.cell(
  stroke: (bottom: 1.2pt),
  [int],
), table.cell(
  stroke: (bottom: 1.2pt),
  [float],
),),
  table.cell(
  colspan: 1,
  stroke: (bottom: 0.6pt),
  [a],
), table.cell(
  colspan: 1,
  stroke: (bottom: 0.6pt),
  [10],
), table.cell(
  colspan: 1,
  stroke: (bottom: 0.6pt),
  [1e-06],
),
  table.cell(
  colspan: 1,
  stroke: (bottom: 0.6pt),
  [b],
), table.cell(
  colspan: 1,
  stroke: (bottom: 0.6pt),
  [10000],
), table.cell(
  colspan: 1,
  stroke: (bottom: 0.6pt),
  [0.1368753],
),
  table.cell(
  colspan: 1,
  stroke: (bottom: 0.6pt),
  [c],
), table.cell(
  colspan: 1,
  stroke: (bottom: 0.6pt),
  [1000000],
), table.cell(
  colspan: 1,
  stroke: (bottom: 0.6pt),
  [163985.8374],
),
)

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.0.tar.gz (65.2 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.0-py3-none-any.whl (40.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: typ_tables-0.1.0.tar.gz
  • Upload date:
  • Size: 65.2 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.0.tar.gz
Algorithm Hash digest
SHA256 b0adb3d3e99495cb72286a2be47b8ff934775200fe2737b8cbafcc0982001c00
MD5 d333512228d72348269b6e19b0794342
BLAKE2b-256 3607f87f4c313f6c22f492081b838cfe543f480bb56df2ef6dc913e8e2a31704

See more details on using hashes here.

File details

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

File metadata

  • Download URL: typ_tables-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 40.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ed94a355f3b91a380dc87905c947f7a21cbeb0bf27a83043b1b19b5fd311215
MD5 a4e02fbcc2f34cb9359e2d8164433558
BLAKE2b-256 0f99117903843d831846c31fece912cb5d6708c23a6a530bcf2c74030ce2da1c

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