Skip to main content

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

Project description

gdx-pandas: Python package to translate between gdx (GAMS data) and pandas.

There are two main ways to use gdxpds. The first use case is the one that was initially supported: direct conversion between GDX files on disk and pandas DataFrames or a csv version thereof. Starting with the Version 1.0.0 rewrite, there is now a second style of use which involves interfacing with GDX files and symbols via the gdxpds.gdx.GdxFile and gdxpds.gdx.GdxSymbol classes.

Please visit https://nrel.github.io/gdx-pandas for the latest documentation.

DEPENDENCIES

  • Python 3.7 or higher (exact compatibility might depend on which GAMS version you are using)
  • pandas (In general you will want the SciPy stack. Anaconda comes with it, or see my notes for Windows.)
  • Install GAMS
  • Put the GAMS directory in your PATH and/or assign it to the GAMS_DIR environment variable
  • GAMS Python bindings
    • See GAMS//apifiles/readme.txt on Windows and Mac, or /opt/gams//apifiles/readme.txt on Linux

    • Run the following for the correct version of the Python bindings (e.g., from the GAMS/**/apifiles/Python/api_39 folder):

      python setup.py install
      

      or

      python setup.py build --build-base={temporary-path-where-you-have-write-access} install
      

      with the latter being for the case when you can install packages into Python but don't have GAMS directory write access.

TESTING

After installation, you can test the package using pytest:

pytest --pyargs gdxpds

If the tests fail due to permission IOErrors, apply chmod g+x and chmod a+x to the gdx-pandas/gdxpds/test folder.

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-1.4.0.tar.gz (645.9 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: gdxpds-1.4.0.tar.gz
  • Upload date:
  • Size: 645.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for gdxpds-1.4.0.tar.gz
Algorithm Hash digest
SHA256 3956e9fefec844d2727b11c43f5276a25fb2540ff6e4eb3e085239422f5ef2be
MD5 9ce5be27d9b31861e9d3bbf746eee503
BLAKE2b-256 248e8cb2a5ab8118367a107a1c230e0e983ab1288e6fb960cc18a09ac9ee22dd

See more details on using hashes here.

Supported by

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