From 6e8f1b334e9df108189a614c0c6872a720b5f3c0 Mon Sep 17 00:00:00 2001 From: ri938 Date: Sat, 8 Jul 2017 21:28:12 +0100 Subject: [PATCH] Minor corrections to previous submit (#16820) --- 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 568b7e1c453f5..b7ae053461cb5 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(self.codes): + if len(indexer): new_target = self.take(indexer) else: new_target = target