-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
REGR: Series access with Index of tuples/frozenset #36147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
e46323a
1a373b9
aa2d1d4
b9c9845
13cdba3
0a98607
ba36e40
50aa567
cff7e4e
bed29b3
a4f90b1
d6ffb46
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -887,21 +887,20 @@ def __getitem__(self, key): | |
elif key_is_scalar: | ||
return self._get_value(key) | ||
|
||
if ( | ||
isinstance(key, tuple) | ||
and is_hashable(key) | ||
and isinstance(self.index, MultiIndex) | ||
): | ||
if not is_iterator(key) and is_hashable(key): | ||
# Otherwise index.get_value will raise InvalidIndexError | ||
rhshadrach marked this conversation as resolved.
Show resolved
Hide resolved
|
||
try: | ||
result = self._get_value(key) | ||
|
||
return result | ||
if isinstance(self.index, MultiIndex): | ||
|
||
try: | ||
result = self._get_value(key) | ||
return result | ||
|
||
except KeyError: | ||
# We still have the corner case where this tuple is a key | ||
# in the first level of our MultiIndex | ||
return self._get_values_tuple(key) | ||
except KeyError: | ||
# We still have the corner case where this tuple is a key | ||
# in the first level of our MultiIndex | ||
return self._get_values_tuple(key) | ||
rhshadrach marked this conversation as resolved.
Show resolved
Hide resolved
|
||
else: | ||
# No fallback for an Index | ||
return self._get_value(key) | ||
|
||
if is_iterator(key): | ||
key = list(key) | ||
|
Uh oh!
There was an error while loading. Please reload this page.