Skip to content

Commit d23dba0

Browse files
committed
TST: clean up groupby/test_categorical.py tests
1 parent 69c5cf3 commit d23dba0

File tree

2 files changed

+697
-679
lines changed

2 files changed

+697
-679
lines changed

doc/source/whatsnew/v0.23.0.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,8 @@ If you wish to retain the old behavior while using Python >= 3.6, you can use
487487
Categorical Grouping no longer expands to all possible groupers
488488
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
489489

490-
In previous versions, grouping by 1 or more categorical columns would result in an index that was the cartesian product of all of the categories for each grouper, not just the observed values. This is inconsistent with output for other dtypes, can potentially cast to different dtypes (as missing values are introduced), and could cause a huge frame to be generated. Pandas will now return only the observed values, regardless if grouping on a categorical column; note that the categorical dtype is *still* preserved. You will still have a categorical columns (:issue:`14942`)
490+
In previous versions, grouping by 1 or more categorical columns would result in an index that was the cartesian product of all of the categories for each grouper, not just the observed values. This is inconsistent with output for other dtypes, can potentially cast to different dtypes (as missing values are introduced), and could cause a huge frame to be generated. Pandas will now return only the observed values, regardless if grouping on a categorical column; note that the categorical dtype is *still* preserved. You will still have a categorical columns (:issue:`14942`). This reverts issues (:issue:`10132`, :issue:`8138`)
491+
491492

492493

493494
.. ipython:: python

0 commit comments

Comments
 (0)