Skip to main content

gdx-pandas is a python package to translate between gdx (GAMS data) and pandas

Project description

gdx-pandas

PyPI Documentation

gdx-pandas is a python package to translate between gdx (GAMS data) and pandas.

Install | Documentation | Uninstall

Install

Preliminaries

  • Python 3.11 or higher (exact compatibility might depend on which GAMS version you are using)

  • Install GAMS

  • Put the GAMS directory in your PATH and/or assign it to the GAMS_DIR environment variable

  • GAMS Python bindings — choose one:

    Recommended. Install the gamsapi that matches your installed GAMS version:

    # xx.y.z corresponds to your GAMS version
    pip install gamsapi[transfer]==xx.y.z
    

    Installing gamsapi this way also enables the optional, much-faster gams.transfer I/O engine for large files (see Configure below).

    Legacy. Use the standalone gdxcc package from PyPI by installing gdxpds with the legacy extra (see below). gdxcc is older and is not version-matched to your GAMS install, but the SWIG-bound C ABI is stable enough that it generally works.

Get the Latest Package

# Recommended (use with the gamsapi install above):
pip install gdxpds

# Legacy (also installs gdxcc; use if you skipped gamsapi):
pip install gdxpds[legacy]

Versions are listed at pypi and https://github.com/NatLabRockies/gdx-pandas/releases.

Configure

gdxpds needs to know where GAMS is, and optionally which I/O engine to use. Set either once via an environment variable, or per call with the gams_dir= / backend= keywords (also --gams_dir / --backend on the CLIs):

export GAMS_DIR=/path/to/gams        # otherwise auto-discovered
export GDXPDS_BACKEND=gams_transfer  # default: gdxcc; gams_transfer is much faster on large files (needs gamsapi)

See Configuration in the documentation for the full keyword / environment-variable / CLI matrix and the speed trade-offs.

Verify installation

After installing gdxpds and a matching gamsapi, verify your environment end-to-end with:

gdxpds test

For a quick environment check without running the full round-trip, use gdxpds info — it prints Python, bindings, the resolved GAMS_DIR (and which discovery branch produced it), and any import-time load error. Useful for bug reports. gdxpds --version prints just the version.

Expected output:

Verifying gdxpds installation...
  [OK]   GAMS install found at <your GAMS directory>
  [OK]   GDX bindings loaded: gams.core.gdx (gamsapi)
  [OK]   Read embedded sample.gdx (...)
  [OK]   Round-trip write->read preserves all symbols
  [OK]   Special values (+Inf, -Inf, NaN) survive round-trip

PASSED: gdxpds installation verified.

Development tests

To run the development test suite, clone the repo and run:

pytest tests

If the tests fail due to permission IOErrors, apply chmod g+x and chmod a+x to the tests folder.

Uninstall

pip uninstall gdxpds

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gdxpds-2.1.0.tar.gz (67.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gdxpds-2.1.0-py3-none-any.whl (50.9 kB view details)

Uploaded Python 3

File details

Details for the file gdxpds-2.1.0.tar.gz.

File metadata

  • Download URL: gdxpds-2.1.0.tar.gz
  • Upload date:
  • Size: 67.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gdxpds-2.1.0.tar.gz
Algorithm Hash digest
SHA256 8859e46a3908621b1a899e9abaf3919b689e8b14eea793a8692bfd3967ee9270
MD5 a8b479b5e0197910e7ff1838a845df8e
BLAKE2b-256 2e8cec6dbb15ad2321e454406acf1d05e1045c964686c341312a0c2547f3819d

See more details on using hashes here.

Provenance

The following attestation bundles were made for gdxpds-2.1.0.tar.gz:

Publisher: release-pypi.yml on NatLabRockies/gdx-pandas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gdxpds-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: gdxpds-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 50.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gdxpds-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad66e8b3cd7cd948080a7974cfe23bc6004346503e4b9a543840f3bb25ee2d7f
MD5 b2c680908937ea156d8085f49378c307
BLAKE2b-256 b74d344b809ed42f85697c21d25fe668bb9725e76d80d4ec41cf447e9464d600

See more details on using hashes here.

Provenance

The following attestation bundles were made for gdxpds-2.1.0-py3-none-any.whl:

Publisher: release-pypi.yml on NatLabRockies/gdx-pandas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page