Skip to content

Commit 4c23101

Browse files
committed
TST: clean up groupby/test_categorical.py tests
1 parent b8d86e2 commit 4c23101

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
@@ -484,7 +484,8 @@ If you wish to retain the old behavior while using Python >= 3.6, you can use
484484
Categorical Grouping no longer expands to all possible groupers
485485
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
486486

487-
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`)
487+
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`)
488+
488489

489490

490491
.. ipython:: python

0 commit comments

Comments
 (0)