Skip to main content

md_table_writer

md_table_writer generates Markdown formatted table(s) from a given data file and writes it to a Markdown file. Supported data file formats: CSV (.csv), NumPy (.npy), and Excel (.xlsx) files.

Download

pip install md_table_writer

Overview

Program processes text from data files and processes them into row-ordered table(s) with column headers. The table is written to a Markdown file either at a specific line number or appended to the end of the file.

CSV and Excel: Users have the option to specify which column headers from the file to process. If left unspecified, the package will process all columns. The package assumes the first row in the file is column headers.

Excel: For Excel files, a new table is generated for every sheet. There is an additional option to specify what sheet names to generate tables for. If left unspecified, every sheet will be processed.

NumPy: Unlike the other two file types, it is required to specify column headers. The first row in the matrix should not be the intended column headers. The number of column headers must match the number of columns in the matrix.

Usage

md_table_writer f md -cols -sheets -align -line -append
Argument Description Required? Default Example
f Data file Yes data.xlsx
md Markdown file Yes report.md
-cols List of column headers to include from data file No, unless data file is a NumPy file -cols Time Population
-sheets List of sheets from Excel file to write tables for No -sheets Sheet1 Sheet2
-align Table column alignment options: left, center, or right No center -align right
-line Line number in Markdown file to write table to No end of file -line 50
-append Flag to write table at end of Markdown file No False -append

Examples

md_table_writer data.xlsx report.md -cols Time Population -sheets Sheet1 Sheet2 -align right -line 50

Generates two tables for Sheet1 and Sheet2 with columns Time and Population from data.xlsx. The table's columns are right aligned. The table is written on line 50 in report.md.

md_table_writer data.csv report.md -align left -append

Generates one table with columns Time and Population from data.csv. The table's columns are left aligned. The table is written to the end of report.md.

md_table_writer data.npy report.md -cols Time Population -line 50

Generates one table from the 2D matrix in data.npy with column headers Time and Population. The table's columns are center aligned. The table is written on line 50 in report.md.

Release files for md-table-writer 0.1.4

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

Source distribution (sdist)

Source distribution for md-table-writer 0.1.4
File Size Uploaded
md_table_writer-0.1.4.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for md-table-writer 0.1.4
File Interpreter ABI Platform
md_table_writer-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 13.5 kB

Release files / md_table_writer-0.1.4.tar.gz

Download URL md_table_writer-0.1.4.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e41a42c7120d97d6661e10d7d53e829fcb4593cc987d3044dbdda9f5650e1e0f
BLAKE2b-256 checksum
How to use checksums
e8ee2e294c6f216c1792a43ecdc5bf3806e2d93f108820961d0c9cbb3e5eecc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Release files / md_table_writer-0.1.4-py3-none-any.whl

Download URL md_table_writer-0.1.4-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4bf4e627d30c7d80a51e4270893e5884d504ed0893d825c60f9f92ed84696ebb
BLAKE2b-256 checksum
How to use checksums
4f8746a7ad461bf430ec8c1d5aa1fcff26945219b891ebafedca38e777836c54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Release history Release notifications | RSS feed

1.1.0

2 release files

1.0.0

2 release files

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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