-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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 1 commit
e46323a
1a373b9
aa2d1d4
b9c9845
13cdba3
0a98607
ba36e40
50aa567
cff7e4e
bed29b3
a4f90b1
d6ffb46
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -887,7 +887,6 @@ def __getitem__(self, key): | |
elif key_is_scalar: | ||
return self._get_value(key) | ||
|
||
# if isinstance(key, tuple) and is_hashable(key): | ||
if not is_iterator(key) and is_hashable(key): | ||
# Otherwise index.get_value will raise InvalidIndexError | ||
if isinstance(self.index, MultiIndex): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. instead of doing the if first, can you do it in the keyerror itself e.g.
of course maybe we should actually do this inside _get_value There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since |
||
|
@@ -900,6 +899,7 @@ def __getitem__(self, 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): | ||
|
Uh oh!
There was an error while loading. Please reload this page.