-
-
Notifications
You must be signed in to change notification settings - Fork 19.7k
Closed
Labels
Description
In GroupBy._python_agg_general we have a check
if self.ngroups == 0:
# e.g. test_evaluate_with_empty_groups different path gets different
# result dtype in empty case.
return self._python_apply_general(f, self._selected_obj, is_agg=True)
The only test that fails if we disable this check is test_evaluate_with_empty_groups, which is passing lambda x: x as its ostensibly-aggregating function. Without this special-casing, we return object dtype instead of float64 dtype in this case. I'm not sure what our policy is on requiring actually-aggregating functions in agg (cc @rhshadrach?) but this feels sketchy.
Reactions are currently unavailable