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 theGAMS_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
File details
Details for the file gdxpds-1.3.0.tar.gz
.
File metadata
- Download URL: gdxpds-1.3.0.tar.gz
- Upload date:
- Size: 645.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b61c55d66f74baaacd3ae26051c8cbeb75117e81909b547a6354539fbf186538 |
|
MD5 | 1ca30ddb08cbd0510382359106ea64ec |
|
BLAKE2b-256 | de2e7677009dae0293cfbec5e324c064b5248e3c272f0f4a4fa11c46ca1eec89 |