Skip to content

Commit 89fadb0

Browse files
committed
dedent second part of Series._get_with
1 parent 3fed6a5 commit 89fadb0

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
@@ -855,20 +855,20 @@ def _get_with(self, key):
855855
return self._get_values(key)
856856
elif key_type == 'boolean':
857857
return self._get_values(key)
858-
else:
859-
try:
860-
# handle the dup indexing case (GH 4246)
861-
if isinstance(key, (list, tuple)):
862-
return self.loc[key]
863858

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

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

0 commit comments

Comments
 (0)