IAMconsortium / pyam

Analysis & visualization of energy & climate scenarios
https://pyam-iamc.readthedocs.io/
Apache License 2.0
221 stars 115 forks source link

Fix an issue when concatenating only pd.DataFrame objects #742

Closed danielhuppmann closed 1 year ago

danielhuppmann commented 1 year ago

Please confirm that this PR has done the following:

Description of PR

This PR fixes an issue identified by @phackstock and @lewisjared - an unexpected failure when concatenating only pd.DataFrame objects using pyam.concat(). The PR also adds a better error message and a test for concatenating IamDataFrame objects with incompatible index dimensions.

codecov[bot] commented 1 year ago

Codecov Report

Merging #742 (3c08ea4) into main (449b77c) will increase coverage by 0.0%. The diff coverage is 100.0%.

@@          Coverage Diff          @@
##            main    #742   +/-   ##
=====================================
  Coverage   95.1%   95.1%           
=====================================
  Files         59      59           
  Lines       6006    6017   +11     
=====================================
+ Hits        5713    5724   +11     
  Misses       293     293           
Impacted Files Coverage Δ
pyam/core.py 95.4% <100.0%> (+<0.1%) :arrow_up:
tests/test_feature_append_concat.py 100.0% <100.0%> (ø)