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

Remove de-duplication in write_dd_files if unnecessary #175

Open
siddharth-krishna opened this issue Feb 2, 2024 · 0 comments
Open

Remove de-duplication in write_dd_files if unnecessary #175

siddharth-krishna opened this issue Feb 2, 2024 · 0 comments

Comments

@siddharth-krishna
Copy link
Collaborator

Right now we deduplicate the GAMS parameters we output in DD files to avoid GAMS errors. This might become unnecessary once we support sourcescen and no longer produce duplicate rows, so revisit this and remove this if appropriate:

# Remove duplicate rows, ignoring value column
query_columns = [c for c in df.columns if c != "VALUE"] or None
df = df.drop_duplicates(subset=query_columns, keep="last")

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

No branches or pull requests

1 participant