Changes in pandas version 1.3.0 appear to drop non-numeric columns after a .groupby(...).agg('sum') operation. This affects the sky region ideal source coverage calculations – at least that's all I've found so more, there may be other affected areas of the pipeline.
Changes in pandas version 1.3.0 appear to drop non-numeric columns after a
.groupby(...).agg('sum')
operation. This affects the sky region ideal source coverage calculations – at least that's all I've found so more, there may be other affected areas of the pipeline.For example, consider the following DataFrame:
Then if we group by source and sum the columns, we get different results between Pandas versions.
The pandas=1.2.4 output (as expected)
The pandas=1.3.0 output is empty.
Changing the aggregation to the following appears to fix the issue. It works for both versions.