Closed danielhuppmann closed 2 years ago
I was looking at addressing iamconsortium/nomenclature#116 when this error popped up.
@danielhuppmann what should in your opinion be the desired behavior? Should I just return the empty data frame (in case inplace
is true
? If so should I log any warning or something along those lines or should I just silently return the empty data frame.
If the desired behavior is the one described above, I would implement the fix in IamDataFrame.rename()
by adding a check using IamDataFrame.empty
as the first thing in the function. If true I would return either the dataframe or none, depending on whether or not inplace
is true
.
Calling the
rename()
method on an empty IamDataFrame returnswhere one could reasonably expect to see an IamDataFrame without raising an error.
Bug reported by @HauHe @Renato-Rodrigues