Skip to content

gdxpds.to_gdx changing dataframe order #75

@DIUANA

Description

@DIUANA

Hi all I hope you are all fine and sage.

I am facing an issue when generating a gdx file with gdxpds.to_gdx function.

I am passing a dictionary with 198 keys and when generating the gdx it is modifyig the order of some sets.

For instance I am providing a dataframe such as this one:

2008 True
2010 True
2015 True
2020 True

And the gdx output is:

2010 Y
2015 Y
2020 Y
2008 Y

It makes difference for the current model I am working on.

Is there any way to keep the passed order when generating the gdx file with gdxpds.to_gdx?

Thanks in advance

Version info:
Python 3.7
GAMS 24.7.4
GAMS 29.1
gdxpds 1.1.0

Edit: I have also tried to implement the backend conversion but it provided me the same output issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions