Skip to content

[ArrayManager] Indexing - implement iset #39734

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 8 commits into from
Feb 15, 2021

Conversation

jorisvandenbossche
Copy link
Member

xref #39146, follow-up on #39722

@jorisvandenbossche jorisvandenbossche added Indexing Related to indexing on series/frames, not to indexes themselves Internals Related to non-user accessible pandas implementation labels Feb 10, 2021
@@ -659,24 +659,50 @@ def idelete(self, indexer):

def iset(self, loc: Union[int, slice, np.ndarray], value):
"""
Set new item in-place. Does not consolidate. Adds new Block if not
contained in the current set of items
Set new column in-place (replaces (an) existing column(s)).
Copy link
Member

Choose a reason for hiding this comment

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

I think this is specifically not-inplace.

This will behave differently from the BlockManager implementation. We should test and/or explicitly comment on that.

Copy link
Member Author

Choose a reason for hiding this comment

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

I mean that it changes the ArrayManager in place (it doesn't return a new ArrayManager). I think that's the same as BlockManager?

For the rest, it replaces the array for a column, so yet it explicitly not-inplace from the array point of view, as it just gets swapped.

Will try to improve the comment.

@jreback jreback added this to the 1.3 milestone Feb 15, 2021
@jreback
Copy link
Contributor

jreback commented Feb 15, 2021

lgtm. @jbrockmendel

@jbrockmendel
Copy link
Member

LGTM

@jorisvandenbossche jorisvandenbossche merged commit a9cacd9 into pandas-dev:master Feb 15, 2021
@jorisvandenbossche jorisvandenbossche deleted the am-iset branch February 15, 2021 19:06
znicholls pushed a commit to znicholls/pandas that referenced this pull request Feb 17, 2021
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 Internals Related to non-user accessible pandas implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants