Closed danielhuppmann closed 1 year ago
Merging #763 (98f59f0) into main (4bfcec0) will increase coverage by
0.0%
. The diff coverage is100.0%
.
@@ Coverage Diff @@
## main #763 +/- ##
=====================================
Coverage 94.4% 94.4%
=====================================
Files 59 59
Lines 6080 6086 +6
=====================================
+ Hits 5744 5750 +6
Misses 336 336
Files Changed | Coverage Δ | |
---|---|---|
pyam/utils.py | 92.7% <100.0%> (+<0.1%) |
:arrow_up: |
tests/test_core.py | 100.0% <100.0%> (ø) |
ok, thanks, indeed, that is the issue i encountered today.
i would have suggested to replace calls to get_index_levels
method with its pandas version, ie something like:
def get_index_levels(index, level):
return index.unique(level)
so they can decide what is the most efficient solution, but your fix is also fine.
Please confirm that this PR has done the following:
Description of PR
This PR introduces an explicit removal of unused levels when initializing from a pandas object. This bug could lead to inconsistent return-values of the dimension-accessors.
closes #762