Skip to content

BUG: obj.loc[listlike] with missing keys and CategoricalIndex #37901

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

Merged
merged 7 commits into from
Nov 17, 2020

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

This behavior was deprecated for all other Index subclasses a few years ago and finally removed in 1.0. AFAICT not removing it for CategoricalIndex was an oversight. xref 8ab6185#r44233424

@@ -261,10 +263,14 @@ def test_loc_listlike(self):
expected = self.df.iloc[[4, 0, 1, 5]]
tm.assert_frame_equal(result, expected, check_index_type=True)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you split the errors conditions to a separate test

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, will update

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated + green

@jreback jreback added Categorical Categorical Data Type Indexing Related to indexing on series/frames, not to indexes themselves labels Nov 17, 2020
@jreback jreback added this to the 1.2 milestone Nov 17, 2020
@jreback jreback merged commit 7f8bf8e into pandas-dev:master Nov 17, 2020
@jbrockmendel jbrockmendel deleted the ref-validate_read_indexer branch November 17, 2020 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants