Skip to content

Commit 16c56d6

Browse files
jbrockmendeljreback
authored andcommitted
CLN: remove itemsize, should have gone in pandas-dev#29918 (pandas-dev#30606)
1 parent 13c9601 commit 16c56d6

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

pandas/core/arrays/categorical.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ class Categorical(ExtensionArray, PandasObject):
302302
__array_priority__ = 1000
303303
_dtype = CategoricalDtype(ordered=False)
304304
# tolist is not actually deprecated, just suppressed in the __dir__
305-
_deprecations = PandasObject._deprecations | frozenset(["tolist", "itemsize"])
305+
_deprecations = PandasObject._deprecations | frozenset(["tolist"])
306306
_typ = "categorical"
307307

308308
def __init__(

pandas/core/indexes/category.py

-5
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,6 @@ def values(self):
361361
""" return the underlying data, which is a Categorical """
362362
return self._data
363363

364-
@property
365-
def itemsize(self):
366-
# Size of the items in categories, not codes.
367-
return self.values.itemsize
368-
369364
def _wrap_setop_result(self, other, result):
370365
name = get_op_result_name(self, other)
371366
return self._shallow_copy(result, name=name)

0 commit comments

Comments
 (0)