Skip to content

Commit

Permalink
CLN: remove itemsize, should have gone in #29918 (#30606)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel authored and jreback committed Jan 2, 2020
1 parent 13c9601 commit 16c56d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion pandas/core/arrays/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ class Categorical(ExtensionArray, PandasObject):
__array_priority__ = 1000
_dtype = CategoricalDtype(ordered=False)
# tolist is not actually deprecated, just suppressed in the __dir__
_deprecations = PandasObject._deprecations | frozenset(["tolist", "itemsize"])
_deprecations = PandasObject._deprecations | frozenset(["tolist"])
_typ = "categorical"

def __init__(
Expand Down
5 changes: 0 additions & 5 deletions pandas/core/indexes/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,6 @@ def values(self):
""" return the underlying data, which is a Categorical """
return self._data

@property
def itemsize(self):
# Size of the items in categories, not codes.
return self.values.itemsize

def _wrap_setop_result(self, other, result):
name = get_op_result_name(self, other)
return self._shallow_copy(result, name=name)
Expand Down

0 comments on commit 16c56d6

Please sign in to comment.