-
Notifications
You must be signed in to change notification settings - Fork 119
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
WIP: Filling out data with pyam defaults #193
Conversation
Thanks @gidden for this really useful new feature! Before diving into the nitty-gritty of the review, I'd like to take this to the meta-level of possible use cases: We have a
|
Hey @danielhuppmann, thanks for the suggestions! As implemented, I think this covers cases 1 and 3. Let's say you have a dataframe as follows:
if you then call
We could add an argument for concatenation. For example:
or
The only question here is then how to intuit the value column (my first thought is that the user would have to supply such a column already). Finally thought: my initial decision was to force the user to provide correctly named columns. For example, my use case has a column name
We could do some additional logic which does this for them like
How does that sound? |
Thanks for the response!
I would say that in use case 2, the
I don't think we need a kwarg
Not sure why there is an empty I'd be happy to give this a shot and PR into your branch. |
closing in favour of #199 |
Please confirm that this PR has done the following:
Description of PR
The idea here is to provide a method that takes a pandas dataframe (currently assumed to be in so-called long-format) with additional observations as columns and pivot them into a 'variable' column. Then other required pyam defaults are added and a
pyam.IamDataFrame
is returned.Tests etc to come.
@danielhuppmann maybe worth taking a look now, just to make sure this basically jives with what you also have been working on?