From 458c0cc0c56f8c50af9cbeb823b9d6e3433a396b Mon Sep 17 00:00:00 2001 From: Chris Ham Date: Sun, 18 Dec 2016 16:37:07 -0500 Subject: [PATCH] CLN: Resubmit of GH14700. Fixes GH14554. Errors other than IndexingError and KeyError now bubble up appropriately. --- doc/source/whatsnew/v0.19.2.txt | 2 ++ pandas/core/indexing.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v0.19.2.txt b/doc/source/whatsnew/v0.19.2.txt index ea59f3fbf493a..af8f561f39aac 100644 --- a/doc/source/whatsnew/v0.19.2.txt +++ b/doc/source/whatsnew/v0.19.2.txt @@ -96,3 +96,5 @@ Bug Fixes - Bug in ``.plot(kind='kde')`` which did not drop missing values to generate the KDE Plot, instead generating an empty plot. (:issue:`14821`) - Bug in ``unstack()`` if called with a list of column(s) as an argument, regardless of the dtypes of all columns, they get coerced to ``object`` (:issue:`11847`) + +-Bug in indexing that transformed ``RecursionError`` into ``KeyError`` or ``IndexingError`` (:issue:`14554`) diff --git a/pandas/core/indexing.py b/pandas/core/indexing.py index c4ae3dcca8367..107d68c192ead 100755 --- a/pandas/core/indexing.py +++ b/pandas/core/indexing.py @@ -848,7 +848,7 @@ def _multi_take(self, tup): [(a, self._convert_for_reindex(t, axis=o._get_axis_number(a))) for t, a in zip(tup, o._AXIS_ORDERS)]) return o.reindex(**d) - except: + except(KeyError, IndexingError): raise self._exception def _convert_for_reindex(self, key, axis=0):