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 hashes)

Uploaded Source

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