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 485f46f commit 8bfd2f5Copy full SHA for 8bfd2f5
pandas/core/arrays/categorical.py
@@ -1756,6 +1756,10 @@ def to_dense(self):
1756
def _codes(self) -> np.ndarray:
1757
return self._ndarray
1758
1759
+ @_codes.setter
1760
+ def _codes(self, value: np.ndarray):
1761
+ self._ndarray = value
1762
+
1763
def _from_backing_data(self, arr: np.ndarray) -> Categorical:
1764
assert isinstance(arr, np.ndarray)
1765
assert arr.dtype == self._ndarray.dtype
0 commit comments