From 603a5b8a014f4d8358681d51e0124c5f09222236 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Fri, 27 Mar 2020 08:58:31 +0100 Subject: [PATCH] CLN: remove CategoricalBlock.to_native_types --- pandas/core/internals/blocks.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/pandas/core/internals/blocks.py b/pandas/core/internals/blocks.py index 71b05eff9b118..b2a8c7a0864b8 100644 --- a/pandas/core/internals/blocks.py +++ b/pandas/core/internals/blocks.py @@ -2802,19 +2802,6 @@ def __init__(self, values, placement, ndim=None): def _holder(self): return Categorical - def to_native_types(self, slicer=None, na_rep="", quoting=None, **kwargs): - """ convert to our native types format, slicing if desired """ - values = self.values - if slicer is not None: - # Categorical is always one dimension - values = values[slicer] - mask = isna(values) - values = np.array(values, dtype="object") - values[mask] = na_rep - - # we are expected to return a 2-d ndarray - return values.reshape(1, len(values)) - def concat_same_type(self, to_concat, placement=None): """ Concatenate list of single blocks of the same type.