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

API: series int-slicing always positional #49869

Closed
wants to merge 4 commits into from

Conversation

jbrockmendel
Copy link
Member

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

nice PR

Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

small comment, otherwise lgtm

assert (ser[:4] == 0).all()
with tm.assert_produces_warning(FutureWarning, match=msg):
assert not (ser[4:] == 0).any()
ser[:4] = 0
Copy link
Member

@phofl phofl Nov 24, 2022

Choose a reason for hiding this comment

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

I might misunderstand this, but as I see it this would pass if both (getitem and setitem) are label based? If yes, can you set explicitly to 0 during creation?

Edit: Sorry missed the test name. Rather using iloc to get the values then?

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, updated

@mroeschke mroeschke added the Indexing Related to indexing on series/frames, not to indexes themselves label Nov 29, 2022
Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

Could you merge main? otherwise lgtm

@mroeschke mroeschke added this to the 2.0 milestone Dec 6, 2022
@mroeschke
Copy link
Member

One more merge conflict otherwise good to merge

@WillAyd
Copy link
Member

WillAyd commented Dec 10, 2022

Another conflict but feel free to merge when fixed

@jbrockmendel
Copy link
Member Author

Discussed on the dev call yesterday, decided to just revert the deprecation in 1.5.3. closing.

@jbrockmendel jbrockmendel deleted the api-slice branch December 15, 2022 20:07
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: is ser[:2] with Int64Index positional or label-based
4 participants