Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to_gdx is changing Text data to Boolean #100

Open
jalidrisi opened this issue Aug 21, 2023 · 1 comment
Open

to_gdx is changing Text data to Boolean #100

jalidrisi opened this issue Aug 21, 2023 · 1 comment

Comments

@jalidrisi
Copy link

jalidrisi commented Aug 21, 2023

I want to write the following data frame to gdx file

R,L
R1,L1
R10,L10
R11,L11
R12,L12
R13,L13
R2,L2
R3,L3
R4,L4
R5,L5
R6,L6
R7,L7
R8,L8
R9,L9

but the output I get in the gdx file is like this
R9,Y
R8,Y
R7,Y
R6,Y
R5,Y
R4,Y
R3,Y
R2,Y
R13,Y
R12,Y
R11,Y
R10,Y
R1,Y
R,Y

how can I keep the same string values from the dataframe ?

@elainethale
Copy link
Member

@jalidrisi, I've implemented the ability to preserve Text information when importing GDX information to pandas DataFrame, but not vice-versa. Providing an option to preserve Text data on write should be easy to implement, but I don't have near-term plans to improve gdx-pandas myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants