Skip to main content
Actions build status PyPI release

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

  1. Map your data to the elements of a GPTable.

  2. Define the format of each element with a custom Theme - or simply use the default gptheme.

  3. Optionally design a Cover page to provide information that relates to all of the tables in your Workbook.

  4. Optionally supply a notes_table with information about any notes.

  5. 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.

Release files for gptables 2.0.1

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

Source distribution (sdist)

Source distribution for gptables 2.0.1
File Size Uploaded
gptables-2.0.1.tar.gz 63.1 kB Details

Built distribution (wheel)

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

Total release size: 135.8 kB

Release files / gptables-2.0.1.tar.gz

Download URL gptables-2.0.1.tar.gz
Size 63.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a5165b13f26a6665c4c5c4c34051a438fa3dcf4e9b455482713381a7eda6a8e1
BLAKE2b-256 checksum
How to use checksums
a2879e091620cc750f50f22cf6df5230c52e7733855011e921be7e68ff08d69e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / gptables-2.0.1-py3-none-any.whl

Download URL gptables-2.0.1-py3-none-any.whl
Size 72.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9111f2db0b6213bdb4cad83604bfac7898de0d878576990c18b080f9c8206f1
BLAKE2b-256 checksum
How to use checksums
577eb54f5d7faa7cc37da180530914b1038b97ddf72994321680d296e0a42018
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.3

2 release files

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

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