Skip to main content

Markup Table

format data to Table

Output table

  • reStructuredText

  • Markdown

  • html

  • csv

  • pandas.dataframe

Read table from

  • html

  • csv

  • rst

  • md

Example

data = [
    [h, h, h...], # header = 1
    [d, d, d...],
    [d, d, d...],
    ...
]

table = MarkupTable(data, header=1)
print(table.to_rst())
print(table.to_md())
print(table.to_csv('csv_file'))

table.append_row(['a', 'b', 'c', 'd', 'e'])
table.set_align('center', rows=[0])
table.set_align('left',rows=range(1, table.row_count(), columns=[3])
table.set_align('right',rows=range(1, table.row_count(), columns=[4])

table.set_format(lambda x: '{:,.2f} %'.format(x), rows=range(1, table.row_count()), columns=[4])

table = MarkupTable.from_html(open('html_file').read())
print(table.to_rst())

table = MarkupTable.from_csv(open('csv_file').read())
print(table.to_rst())

Metadata

Release files for mtable 0.2.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for mtable 0.2.22
File Interpreter ABI Platform Actions
mtable-0.2.22-py3-none-any.whl Python 3 none any Details for mtable-0.2.22-py3-none-any.whl

Release files / mtable-0.2.22-py3-none-any.whl

Download URL mtable-0.2.22-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1488f81a2eca70a952370d796303a48921b904fedb65e12236d91ff26fd16c95
BLAKE2b-256 checksum
How to use checksums
6c56ae07b3398cabb6fb387f7f3578ae84c693cc13674c591dcc1d7596d6b34a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.5

Security for mtable 0.2.22

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page