Simplifying good practice in statistical tables.
Project description
gptables is an opinionated python package for spreadsheet production. It produces .xlsx files from your pandas dataframes.
gptables uses the Analysis Function spreadsheet guidance. It advocates a strong adherence to the guidance by restricting the range of operations possible. The default theme gptheme should accommodate most use cases. However, the Theme object allows development of custom themes, where other formatting is required.
Users may also be interested in csvcubed, a package for turning data and metadata into machine-readable CSV-W files.
R users should check out aftables, an R native equivalent to gptables.
Requirements
Python 3.9+
Using an earlier version? Install gptables version before 2.0.0.
Install
gptables is available from PyPI.
As a user:
Using a virtual environment? Use pip install gptables in a terminal.
If you’re not using a virtual environment, use python -m pip install gptables instead.
All done!
As a developer:
Navigate to the directory where this repo is cloned.
Use pip install -e . to install an editable version of the package.
Use pip install .[dev] to install the dependencies for developers.
For working on docs, also use pip install .[docs].
Set up pre-commit to run automatically with pre-commit install.
Usage
Map your data to the elements of a GPTable.
Define the format of each element with a custom Theme - or simply use the default gptheme.
Optionally design a Cover page to provide information that relates to all of the tables in your Workbook.
Optionally supply a notes_table with information about any notes.
Make you gptable with write_workbook!
Note: This package create perfectly accessible spreadsheets but will help with many requirements. Users should refer to the Analysis Function spreadsheet guidance and the spreadsheet accessibility checklist.
Contributing
Found a bug, or would like to suggest a new feature? The best way is to let us know by raising an issue.
Alternatively, please email us - the Analysis Standards at Pipelines team at the Office for National Statistics (ASAP@ons.gov.uk).
Let us know if you use the package. We’d love to know what’s working well, and what could be improved!
Requests and fixes are managed according to resource capacity, and we aim to acknowledge queries within one working week. Please follow up in the case of this taking longer.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gptables-2.0.0.tar.gz.
File metadata
- Download URL: gptables-2.0.0.tar.gz
- Upload date:
- Size: 63.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ab765df4d9cb26483f43121df2ce118f03af01af7e9924dd4efd1866fa043d8
|
|
| MD5 |
4ee8d95d93130607f38ca75dbbb324b2
|
|
| BLAKE2b-256 |
fbd98bc1082f9bee1c7b5ccbd1eee319ed0e5c3b5dd2a2709a14bf0671bc807f
|
Provenance
The following attestation bundles were made for gptables-2.0.0.tar.gz:
Publisher:
ci.yml on ONSdigital/gptables
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gptables-2.0.0.tar.gz -
Subject digest:
0ab765df4d9cb26483f43121df2ce118f03af01af7e9924dd4efd1866fa043d8 - Sigstore transparency entry: 699568796
- Sigstore integration time:
-
Permalink:
ONSdigital/gptables@b161499956d3d8d58c7306a9afbf97e8ce596b05 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/ONSdigital
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@b161499956d3d8d58c7306a9afbf97e8ce596b05 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gptables-2.0.0-py3-none-any.whl.
File metadata
- Download URL: gptables-2.0.0-py3-none-any.whl
- Upload date:
- Size: 72.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ca466cc2410dbb200353d807d5d33553663b595815622df1e40ba47de065b93
|
|
| MD5 |
f73924de664a7a16766c2a8b04706044
|
|
| BLAKE2b-256 |
b80907370c05f5f4ebe9fc19f2f8cc965c1e270c795dae50d43875adcd03c1df
|
Provenance
The following attestation bundles were made for gptables-2.0.0-py3-none-any.whl:
Publisher:
ci.yml on ONSdigital/gptables
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gptables-2.0.0-py3-none-any.whl -
Subject digest:
4ca466cc2410dbb200353d807d5d33553663b595815622df1e40ba47de065b93 - Sigstore transparency entry: 699568807
- Sigstore integration time:
-
Permalink:
ONSdigital/gptables@b161499956d3d8d58c7306a9afbf97e8ce596b05 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/ONSdigital
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@b161499956d3d8d58c7306a9afbf97e8ce596b05 -
Trigger Event:
push
-
Statement type: