Skip to content

REF: make _setitem_with_indexer iloc-only #31837

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 3 commits into from
Feb 10, 2020

Conversation

jbrockmendel
Copy link
Member

some overlap with #31797.

_setitem_with_indexer is used for positional indexers, so it is misleading for it to be in loc anyway.

_setitem_with_indexer is an absolute beast, will be easier to sort out when we dont have to worry about what class we're in.

The diff looks misleading. All this does is

  • move _setitem_with_indexer, _setitem_with_indexer_missing, _align_series, _align_frame from LocationIndexer to _iLocIndexer
  • make LocationIndexer.__setitem__ call _has_valid_setitem_indexer before calling _setitem_with_indexer instead of inside of it, so we get the right class's _has_valid_setitem_indexer
  • dispatch to iloc if we are not already iloc
  • update usages in core.frame

@jreback jreback added Indexing Related to indexing on series/frames, not to indexes themselves Refactor Internal refactoring of code labels Feb 9, 2020
@jreback jreback added this to the 1.1 milestone Feb 9, 2020
@jreback
Copy link
Contributor

jreback commented Feb 9, 2020

i'll trust you on the diff; needs a rebase

@jbrockmendel
Copy link
Member Author

rebased+green

@jreback
Copy link
Contributor

jreback commented Feb 10, 2020

conflict, can you rebase

@jreback
Copy link
Contributor

jreback commented Feb 10, 2020

go ahead and merge on green.

@jbrockmendel jbrockmendel merged commit 8680ddd into pandas-dev:master Feb 10, 2020
@jbrockmendel jbrockmendel deleted the iloc-only2 branch February 10, 2020 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants