Tabulate Cell Merger
This is a package to merge cells when tabulating table. A table is a list of lists which can be represented into rows and columns. It is inspired in the already existing tabulate package.
How to import the module
Module's name for importing:
import tabulate_cell_merger.tabulate_cell_merger
How to use
The module contains one function for you to use: tabulate(). This function accepts three arguments as following:
tabulate(table, colspan, rowspan)
colspan and rowspan are optional arguments. The table argument is required.
To merge cells horizontally, use the colspan argument.
To merge cells vertically, use the rowspan argument.
These arguments are dictionaries.
They allow you to stretch cells over others.
Syntax:
colspan = {(y, x): value}
rowspan = {(y, x): value}
For each cell you want to stretch, you have to associate its coordinates, having then a tuple as key, to a stretching value: 1 generates no stretching, 2 stretches over one other cell (to the right or to downwards), etc.
Here, y is the cell row, x the cell column, and value the stretching value.
An example
Input:
table = [['a1', 'b1'], ['a2', 'b2']]
colspan = {(0, 0): 2}
rowspan = {(0, 1): 2}
Output:
+----+----+
| a1 |
+----+ +
| a2 | |
+----+----+
Metadata
Release files for tabulate-cell-merger 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tabulate-cell-merger-0.0.2.tar.gz | 3.8 kB | Without provenance | Details for tabulate-cell-merger-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tabulate_cell_merger-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for tabulate_cell_merger-0.0.2-py3-none-any.whl |
Total release size: 8.1 kB
Release files / tabulate-cell-merger-0.0.2.tar.gz
| Download URL | tabulate-cell-merger-0.0.2.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2cf316279da9ec5f34996ac904606c9cd01c52b86c4ac4bd0d8b29ae3d11bac2
|
|
BLAKE2b-256 checksum How to use checksums |
5ba672d851554e751f7896cc7984202393f92b3e7deb1895b1db55794025077b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0
|
Release files / tabulate_cell_merger-0.0.2-py3-none-any.whl
| Download URL | tabulate_cell_merger-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2aec197c86ce878ba31f0ac09633f0b2249fcf6bb3323a8b80fdd0694c69aa74
|
|
BLAKE2b-256 checksum How to use checksums |
4d272cf83904888a1a3cd6f93c69e96fb9760f6309ed25d8c3866d0fadddafa3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0
|
Security for tabulate-cell-merger 0.0.2
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.