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: int slicing always positional #53338

Merged
merged 11 commits into from
Aug 4, 2023
Merged

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

We've gone back and forth on this a couple times (#45324, #49869 would have done this as a breaking change in 2.0).

@mroeschke mroeschke added Deprecate Functionality to remove in pandas Indexing Related to indexing on series/frames, not to indexes themselves labels May 22, 2023
@mroeschke
Copy link
Member

Do you remember why this was reverted before?

@jbrockmendel
Copy link
Member Author

Do you remember why this was reverted before?

There was a deprecation #45324 that was basically the opposite of this (make slice-with-integer-index label-based) but i messed up the deprecation and didn't warn in enough cases (discussed #49612), so actually enforcing it would have broken a bunch more stuff.

Also you pointed out (#49612 (comment)) a different inconsistency, and I guess in the Dec dev call we decided to punt on this.

@mroeschke
Copy link
Member

+1 for still moving forward with this deprecation

@jbrockmendel
Copy link
Member Author

@phofl @MarcoGorelli OK here?

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

yeah no objections

wouldn't be opposed to completely deprecating slicing rows, and only supporting .iloc / loc

@mroeschke
Copy link
Member

Looks good just needs a rebase

@mroeschke mroeschke added this to the 2.1 milestone Aug 4, 2023
@mroeschke mroeschke merged commit 39f9b33 into pandas-dev:main Aug 4, 2023
37 checks passed
@mroeschke
Copy link
Member

Thanks @jbrockmendel

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 Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants