We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03b7211 commit 79b3d45Copy full SHA for 79b3d45
bisect/43232.py
@@ -0,0 +1,14 @@
1
+# BUG: reorder_categories with inplace=True is not changing the dtype.categories #43232
2
+
3
+import pandas as pd
4
5
+print(pd.__version__)
6
7
+sr = pd.Series(["a", "b", "c"], dtype="category")
8
9
+sr.cat.reorder_categories(["c", "b", "a"], inplace=True)
10
+print(sr)
11
12
+result = sr.dtype.categories
13
+expected = pd.Index(["c", "b", "a"], dtype="object")
14
+pd.testing.assert_index_equal(result, expected)
0 commit comments