mattirish / gdx-pandas

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gdx-pandas

PyPI Documentation

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

Install | Uninstall

Install

Preliminaries

  • Python 3.4 or higher 3.X (support for Python 2.X has been discontinued)
  • 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.
  • 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.1.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.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%