Open danielhuppmann opened 3 years ago
Based on the discussion initiated by @pjuergens at #524, this issue takes one of the further improvements discussed in that issue:
The initial solution implemented in #527 implicitly assumes None if a value for a specific index on a but not on b (or vice-versa). For illustration, model_a|scen_b is dropped in the unit tests, see https://github.com/IAMconsortium/pyam/blob/63bbea845284f1127e04b1d55aa830b567cd1e0a/tests/test_ops.py#L10
None
model_a|scen_b
As an additional feature, it would be helpful to (optionally) set a default value in the data-ops functions if a value is defined in one argument but not another.
Update: there is now a fillna option, but this not work with pint.Quantity instances.
fillna
Based on the discussion initiated by @pjuergens at #524, this issue takes one of the further improvements discussed in that issue:
The initial solution implemented in #527 implicitly assumes
None
if a value for a specific index on a but not on b (or vice-versa). For illustration,model_a|scen_b
is dropped in the unit tests, see https://github.com/IAMconsortium/pyam/blob/63bbea845284f1127e04b1d55aa830b567cd1e0a/tests/test_ops.py#L10As an additional feature, it would be helpful to (optionally) set a default value in the data-ops functions if a value is defined in one argument but not another.