-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CLN: MultiIndex.get_value is a hive of scum and villainy #31662
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
Conversation
@@ -405,7 +405,7 @@ def test_agg_misc(): | |||
] | |||
|
|||
# passed lambda | |||
for t in cases: | |||
for i, t in enumerate(cases): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Where is this i
used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was in debugging, thought i had reverted it, thanks for pointing it out
# We allow tuples if they are hashable, whereas other Index | ||
# subclasses require scalar. | ||
# We have to explicitly exclude generators, as these are hashable. | ||
raise InvalidIndexError(key) | ||
|
||
def _try_mi(k): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should think about making try_mi non-nested (just for cleanliness), give it a better name and type in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yah there's plenty more to do here, but this is a big step
This will in turn allow for simplification for other code that has built up kludges around MultiIndex.get_value's behavior