Skip to content
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

DEPR: ignoring missing labels when indexing on MultiIndex level #42351

Merged
merged 3 commits into from
Jul 14, 2021

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

There are a bunch of issues that boil down to this weird behavior. I need to track down the full list (@attack68 do you have such a list handy?)

@attack68
Copy link
Contributor

attack68 commented Jul 8, 2021

There are a bunch of issues that boil down to this weird behavior. I need to track down the full list (@attack68 do you have such a list handy?)

I haven't got a list but I have a script/notebook that tries to iterate over all possible combinations and display the results. I will try and post it later.

I hold the view that the tests for multiindex loc is quite sparse in terms of patchy parametrised tests, but I think a more robust algorithmic approach to all combinations might be worthwhile. Perhaps a routine for this might develop from the script??

@jreback jreback added Deprecate Functionality to remove in pandas MultiIndex labels Jul 8, 2021
@attack68
Copy link
Contributor

https://github.com/attack68/pandas/tree/multiindex_ipynb
file in root: LocIndexing.ipynb

It gathers and analyses many different combinations of loc slicing.

For a MultiIndex with ['a', 'b', 'c', 'd'] in each level, (i.e. '!' not in any level) here is a summary of some odd series.loc slices, when combining with different index types (duplicated vs unique, and monotonic vs unsorted).

Screen Shot 2021-07-13 at 16 32 18

@jreback jreback added this to the 1.4 milestone Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas MultiIndex
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants