-
Notifications
You must be signed in to change notification settings - Fork 121
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
Confirm expected behaviour of aggregate with nested hierarchy #737
Comments
If I add model scenario region variable unit year value
0 model_a scen_a World Primary Energy|Fossil EJ/yr 2010 85.0
1 model_a scen_a World Primary Energy|Fossil|Coal EJ/yr 2010 40.0 |
(
IamDataFrame(PRICE_NESTED_DF)
.aggregate(variable='Primary Energy|Fossil', recursive=True)
.aggregate(variable='Primary Energy|Fossil')
) returns model scenario region variable unit year value
0 model_a scen_a World Primary Energy|Fossil EJ/yr 2010 40.0 |
Thanks @willu47 - indeed, I'd say that this is behaving as expected.
Question back to you: which other behavior would you find more intuitive? Or how could we improve the docs?
|
And FYI: pyam has a testing module with a function |
Hi, following a question I asked in the openmod session today, please could you confirm the expected behaviour of the
.aggregate
function when presented with missing levels in the data hierarchy. For example, the following test fails because the two coal sub-categoriesPrimary Energy|Fossil|Coal|Lignite
andPrimary Energy|Fossil|Coal|Brown
are ignored.Am I missing something?
The text was updated successfully, but these errors were encountered: