gdx-pandas is a python package to translate between gdx (GAMS data) and pandas.
Install | Documentation | Uninstall
PATH
and/or assign it to the GAMS_DIR
environment variableGAMS Python bindings
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.
import gdxcc
fails (which will also cause import gdxpds
to fail) because there "is no _gdxcc
module", one workaround is to copy all the _*.pyd
(or _*.so
) files from GAMS/**/apifiles/Python/api_XX/ and paste them into your Python environment next to, e.g., the gdxcc-8-py3.9.egg
file, which on Anaconda is your environment's lib/site-packages directory.pip install gdxpds
or
pip install git+https://github.com/NREL/gdx-pandas.git@v1.4.0
or
pip install git+https://github.com/NREL/gdx-pandas.git@main
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.
pip uninstall gdxpds