Python package to read gdx data into pandas dataframes
Install | Use | Update | Uninstall
- Python 2.7 (easiest to get through Anaconda at https://www.continuum.io/downloads)
- pandas (should come automatically with Anaconda)
- GAMS Python bindings: On command line, navigate to the GAMS Python API files for Python 2.7, e.g. C:\GAMS\win64\24.7\apifiles\Python\api, and run this command:
This will make available the gdxcc and gams python modules, which are imported by gdxread.
python setup.py install
From command line:
pip install git+https://github.com/mmowers/gdxread.git@master
To get a pandas dataframe from GDX parameter in a python script:
import gdxread
df = gdxread.get_df_from_param('path_to_gdx_file', 'param_name')
To update/upgrade gdxread, go to command line and enter:
pip install git+https://github.com/mmowers/gdxread.git@master --upgrade
pip uninstall gdxread