Skip to content
 
 

Latest commit

 

History

191 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.4 or 3.6 (gdx-pandas support for Python 2.X has been discontinued; GAMS does not yet support Python 3.7)
  • pandas (In general you will want the SciPy stack. Anaconda comes with it, or see my notes for Windows.)
  • For Python versions < 3.4, enum34. Also uninstall the enum package if it is installed.
  • Install GAMS
  • Put the GAMS directory in your PATH and/or assign it to the GAMS_DIR environment variable
  • GAMS Python bindings
    • See GAMS/win64/XX.X/apifiles/readme.txt on Windows, GAMS/gamsXX.X_osx_x64_64_sfx/apifiles/readme.txt on Mac, or /opt/gams/gamsXX.X_linux_x64_64_sfx/apifiles/readme.txt on Linux

    • Run the following for the correct version of the Python bindings

      python setup.py install

      or

      python setup.py build --build-base=/path/to/somwhere/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.

    • For Python 3.X, use .../apifiles/Python/api_XX/setup.py. For Python 3.X in particular you will need GAMS version >= 24.5.1 (Python 3.4, Windows and Linux), 24.7.4 (Python 3.4, Mac OS X), or >= 24.8.4 (Python 3.6)

Get the Latest Package

pip install gdxpds

or

pip install git+https://github.com/NREL/gdx-pandas.git@v1.2.0

or

pip install git+https://github.com/NREL/gdx-pandas.git@master

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

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.

Uninstall

pip uninstall gdxpds

About

Python interface to read and write GAMS GDX files using pandas.DataFrames as the intermediate data format.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages