From 0a20024a519fbc36320fd8d2d1a2bb8b900b1146 Mon Sep 17 00:00:00 2001 From: ri938 Date: Tue, 4 Jul 2017 16:19:10 +0100 Subject: [PATCH] Minor correction to previous submit --- pandas/core/indexes/category.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/indexes/category.py b/pandas/core/indexes/category.py index b7ae053461cb5..568b7e1c453f5 100644 --- a/pandas/core/indexes/category.py +++ b/pandas/core/indexes/category.py @@ -420,7 +420,7 @@ def reindex(self, target, method=None, level=None, limit=None, indexer, missing = self.get_indexer_non_unique(np.array(target)) - if len(indexer): + if len(self.codes): new_target = self.take(indexer) else: new_target = target