Skip to content

Commit 5b92464

Browse files
committed
dedent second part of Series._get_with
1 parent bed8d34 commit 5b92464

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

pandas/core/series.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -854,20 +854,20 @@ def _get_with(self, key):
854854
return self._get_values(key)
855855
elif key_type == 'boolean':
856856
return self._get_values(key)
857-
else:
858-
try:
859-
# handle the dup indexing case (GH 4246)
860-
if isinstance(key, (list, tuple)):
861-
return self.loc[key]
862857

863-
return self.reindex(key)
864-
except Exception:
865-
# [slice(0, 5, None)] will break if you convert to ndarray,
866-
# e.g. as requested by np.median
867-
# hack
868-
if isinstance(key[0], slice):
869-
return self._get_values(key)
870-
raise
858+
try:
859+
# handle the dup indexing case (GH 4246)
860+
if isinstance(key, (list, tuple)):
861+
return self.loc[key]
862+
863+
return self.reindex(key)
864+
except Exception:
865+
# [slice(0, 5, None)] will break if you convert to ndarray,
866+
# e.g. as requested by np.median
867+
# hack
868+
if isinstance(key[0], slice):
869+
return self._get_values(key)
870+
raise
871871

872872
def _get_values_tuple(self, key):
873873
# mpl hackaround

0 commit comments

Comments
 (0)