Skip to content

Commit c69f7d8

Browse files
CLN: remove CategoricalBlock.to_native_types (#33063)
1 parent c47e9ca commit c69f7d8

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

pandas/core/internals/blocks.py

-13
Original file line numberDiff line numberDiff line change
@@ -2802,19 +2802,6 @@ def __init__(self, values, placement, ndim=None):
28022802
def _holder(self):
28032803
return Categorical
28042804

2805-
def to_native_types(self, slicer=None, na_rep="", quoting=None, **kwargs):
2806-
""" convert to our native types format, slicing if desired """
2807-
values = self.values
2808-
if slicer is not None:
2809-
# Categorical is always one dimension
2810-
values = values[slicer]
2811-
mask = isna(values)
2812-
values = np.array(values, dtype="object")
2813-
values[mask] = na_rep
2814-
2815-
# we are expected to return a 2-d ndarray
2816-
return values.reshape(1, len(values))
2817-
28182805
def concat_same_type(self, to_concat, placement=None):
28192806
"""
28202807
Concatenate list of single blocks of the same type.

0 commit comments

Comments
 (0)