Skip to content

Commit b259f12

Browse files
committed
Category dtype is lost when concatenating MultiIndex, xref pandas-dev/pandas#53697.
1 parent 11f633d commit b259f12

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

dask/dataframe/groupby.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -501,13 +501,7 @@ def _non_agg_chunk(df, *by, key, dropna=None, observed=None, **kwargs):
501501
):
502502
has_categoricals = True
503503
full_index = pd.MultiIndex.from_product(
504-
(
505-
level.categories
506-
if isinstance(level, pd.CategoricalIndex)
507-
else level
508-
for level in result.index.levels
509-
),
510-
names=result.index.names,
504+
result.index.levels, names=result.index.names
511505
)
512506
if has_categoricals:
513507
# If we found any categoricals, append unobserved values to the end of the

0 commit comments

Comments
 (0)