You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.23.0.txt
+26-14
Original file line number
Diff line number
Diff line change
@@ -598,6 +598,32 @@ Documentation Changes
598
598
Bug Fixes
599
599
~~~~~~~~~
600
600
601
+
Categorical
602
+
^^^^^^^^^^^
603
+
604
+
.. warning::
605
+
606
+
A class of bugs were introduced in pandas 0.21 with ``CategoricalDtype`` that
607
+
affects the correctness of operations like ``merge``, ``concat``, and
608
+
indexing when comparing multiple unordered ``Categorical`` arrays that have
609
+
the same categories, but in a different order. We highly recommend upgrading
610
+
or manually aligning your categories before doing these operations.
611
+
612
+
- Bug in ``Categorical.equals`` returning the wrong result when comparing two
613
+
unordered ``Categorical`` arrays with the same categories, but in a different
614
+
order (:issue:`16603`)
615
+
- Bug in :func:`pandas.api.types.union_categoricals` returning the wrong result
616
+
when for unordered categoricals with the categories in a different order.
617
+
This affected :func:`pandas.concat` with Categorical data (:issue:`19096`).
618
+
- Bug in :func:`pandas.merge` returning the wrong result when joining on an
619
+
unordered ``Categorical`` that had the same categories but in a different
620
+
order (:issue:`19551`)
621
+
- Bug in :meth:`CategoricalIndex.get_indexer` returning the wrong result when
622
+
``target`` was an unordered ``Categorical`` that had the same categories as
623
+
``self`` but in a different order (:issue:`19551`)
624
+
- Bug in :meth:`Index.astype` with a categorical dtype where the resultant index is not converted to a :class:`CategoricalIndex` for all types of index (:issue:`18630`)
625
+
- Bug in :meth:`Series.astype` and ``Categorical.astype()`` where an existing categorical data does not get updated (:issue:`10696`, :issue:`18593`)
626
+
- Bug in :class:`Index` constructor with ``dtype=CategoricalDtype(...)`` where ``categories`` and ``ordered`` are not maintained (issue:`19032`)
601
627
602
628
Datetimelike
603
629
^^^^^^^^^^^^
@@ -745,20 +771,6 @@ Reshaping
745
771
- Improved error message for :func:`DataFrame.merge` when there is no common merge key (:issue:`19427`)
746
772
-
747
773
748
-
749
-
Categorical
750
-
^^^^^^^^^^^
751
-
752
-
-
753
-
- Bug in :func:`pandas.api.types.union_categoricals` returning the wrong result
754
-
when all the categoricals had the same categories, but in a different order.
755
-
This affected :func:`pandas.concat` with Categorical data (:issue:`19096`).
756
-
- Bug in ``Categorical.equals`` between two unordered categories with the same categories, but in a different order (:issue:`16603`)
757
-
- Bug in :meth:`Index.astype` with a categorical dtype where the resultant index is not converted to a :class:`CategoricalIndex` for all types of index (:issue:`18630`)
758
-
- Bug in :meth:`Series.astype` and ``Categorical.astype()`` where an existing categorical data does not get updated (:issue:`10696`, :issue:`18593`)
759
-
- Bug in :class:`Index` constructor with ``dtype=CategoricalDtype(...)`` where ``categories`` and ``ordered`` are not maintained (issue:`19032`)
0 commit comments