A simple python tool to extract sets and parameters from excel files by creating GDX files for GAMS
Project description
Excel to gdx
A simple python tool to extract sets and parameters from excel files by creating GDX files for GAMS
See sheet name 'py' in the excel files that describes sets and parameters settings. Similar approach for https://www.gams.com/latest/docs/T_GDXXRW.html
Particularly useful for linux and ios where GDXXRW.exe is not compatible, see here: https://forum.gamsworld.org/viewtopic.php?t=10418#p24019
NEW FEATURE (v0.0.5):+INF, -INF, EPS
NEW FEATURE (v0.0.6): gams_dir as new argument.
Required library:
- gdxpds
- pandas
- numpy
- openpyxl
- GAMS API for python
Installation
pip install exceltogdx
Delete
pip uninstall exceltogdx
See notebook example.ipynb and download the excel file test.xlsx
from exceltogdx import exceltogdx
frames = exceltogdx('test.xlsx','test.gdx', gams_dir=None)
Repository: https://github.com/diw-berlin/exceltogdx
If you find and error in the code, please raise an issue or solve it by pushing a commit.
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
Built Distribution
File details
Details for the file exceltogdx-0.0.6.tar.gz
.
File metadata
- Download URL: exceltogdx-0.0.6.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 119f5b66c5626fc0b511bbff3b7f5a5b2e2dea24f0a1ca812caa558bc27e53ab |
|
MD5 | 24065752e035d7eb98982acb6c6ac1f4 |
|
BLAKE2b-256 | e595e770b0985824953113094baa0c188aa4d1381a0d5100d8dcc934c08ec290 |
File details
Details for the file exceltogdx-0.0.6-py2.py3-none-any.whl
.
File metadata
- Download URL: exceltogdx-0.0.6-py2.py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5cf8aec1e7d4d5a5241e5bf898509ba27144457acce7e6a84a23d102e142f2a |
|
MD5 | 6a4d732c7d324e4bd2fafcb2b50e647a |
|
BLAKE2b-256 | dcb93f98fba47f4b544b2bba0207076772188e175c876b7bd46a4dd0ebac917a |