From 5cd7bcb5b49781e8d48dfc214b7092d2586042fd Mon Sep 17 00:00:00 2001 From: dcherian Date: Fri, 4 Nov 2022 18:23:39 -0600 Subject: [PATCH] Better fix --- flox/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flox/core.py b/flox/core.py index acd75a772..e1e7dc039 100644 --- a/flox/core.py +++ b/flox/core.py @@ -1350,7 +1350,10 @@ def dask_groupby_agg( aggregate=partial(aggregate, expected_groups=index, reindex=True), ) ) - groups_.append(cohort) + # This is done because pandas promotes to 64-bit types when an Index is created + # So we use the index to generate the return value for consistency with "map-reduce" + # This is important on windows + groups_.append(index.values) reduced = dask.array.concatenate(reduced_, axis=-1) groups = (np.concatenate(groups_),)