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

Return dataframe of mapping sets, parameters etc. with ordered columns #82

Closed
danielhuppmann opened this issue Aug 23, 2018 · 1 comment
Assignees
Labels
enh New features & functionality
Milestone

Comments

@danielhuppmann
Copy link
Member

Currently, calling Scenario.par() returns a pd.DataFrame with columns in no particular order.

This should be changed to using the order of Scenario.idx_names() + ['value', 'unit'] (for parameters) and ['lvl', 'mrg'] for variables and equations, respectively.

@danielhuppmann danielhuppmann added the enh New features & functionality label Aug 23, 2018
@khaeru khaeru added this to the 2.0 milestone Jul 15, 2020
@khaeru khaeru self-assigned this Jul 15, 2020
@khaeru
Copy link
Member

khaeru commented Jul 15, 2020

Just realized this was done as part of setting up the Backend API / JDBCBackend in #182:

ixmp/ixmp/backend/jdbc.py

Lines 757 to 760 in 59e99e4

# Retrieve the item
item = self._get_item(s, type, name, load=True)
idx_names = list(item.getIdxNames())
idx_sets = list(item.getIdxSets())

@khaeru khaeru closed this as completed Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enh New features & functionality
Projects
None yet
Development

No branches or pull requests

2 participants