Tuesday, June 14, 2016

Getting GAMS data into Julia

Using gdx2sqlite it is very easy to populate a SQLite database from GAMS data. This should allow us to get data into Julia somewhat painlessly. Let's try:


Formatting of Data.Tables

Interestingly the format of the Data.Table is not as nice as advertised in https://github.com/JuliaDB/SQLite.jl, where we see:

image

I get rather ugly output, not a nicely formatted table. The trick seems to be to convert the Data.Table into a DataFrame. Note that it is important to import the DataFrames package before SQLite.

No comments:

Post a Comment