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
Fix: unequal comparisons of categorical and scalar
Before, unequal comparisons were not checking the order of the
categories.
This was due to a conversion to an ndarray, which turned the
comparison to one between ndarray and scalar, which of course
has no categories to take into account.
Also add test cases and remove the one which actually tested the
wrong behaviour.
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.16.1.txt
+1
Original file line number
Diff line number
Diff line change
@@ -120,3 +120,4 @@ Bug Fixes
120
120
121
121
- Bug in which ``SparseDataFrame`` could not take `nan` as a column name (:issue:`8822`)
122
122
123
+
- Bug in unequal comparisons between a ``Series`` of dtype `"category"` and a scalar (e.g. ``Series(Categorical(list("abc"), categories=list("cba"), ordered=True)) > "b"``, which wouldn't use the order of the categories but use the lexicographical order. (:issue:`9848`)
0 commit comments