diff --git a/pandas/core/indexes/category.py b/pandas/core/indexes/category.py index 06df8f85cded7..d2ec2bcfeb470 100644 --- a/pandas/core/indexes/category.py +++ b/pandas/core/indexes/category.py @@ -491,6 +491,7 @@ def reindex(self, target, method=None, level=None, limit=None, tolerance=None): # in which case we are going to conform to the passed Categorical new_target = np.asarray(new_target) if is_categorical_dtype(target): + new_target = Categorical(new_target, dtype=target.dtype) new_target = target._shallow_copy(new_target, name=self.name) else: new_target = Index(new_target, name=self.name) @@ -514,6 +515,7 @@ def _reindex_non_unique(self, target): if not (cats == -1).any(): # .reindex returns normal Index. Revert to CategoricalIndex if # all targets are included in my categories + new_target = Categorical(new_target, dtype=self.dtype) new_target = self._shallow_copy(new_target) return new_target, indexer, new_indexer