Skip to content

Conversation

@jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented Nov 1, 2021

This should in turn allow us to avoid some special-casing that we do in internals/putmask_smart.

Sits on top of #44261

@jbrockmendel jbrockmendel changed the title Ref putmasks BUG: broadcasting listlike values in Series.__setitem__ GH#44265 Nov 1, 2021
@lithomas1 lithomas1 added Bug Indexing Related to indexing on series/frames, not to indexes themselves Nested Data Data where the values are collections (lists, sets, dicts, objects, etc.). labels Nov 2, 2021
@jbrockmendel
Copy link
Member Author

@jreback following this we can get rid of both putmask_preserve and putmask_without_repeat

@jreback
Copy link
Contributor

jreback commented Nov 4, 2021

can you rebase

@jbrockmendel
Copy link
Member Author

rebased + greenish

s = Series(data)
s[selection] = box(item)

if selection.sum() != 1:
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm maybe make this another test

it's really confusing u r boxing first then setting it after

Copy link
Member Author

Choose a reason for hiding this comment

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

sure, updated

@jbrockmendel
Copy link
Member Author

updated + greenish

@jreback jreback added this to the 1.4 milestone Nov 5, 2021
@jreback
Copy link
Contributor

jreback commented Nov 5, 2021

lgtm @phofl if you can have a look

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.

lgtm

@phofl phofl merged commit 8d868db into pandas-dev:master Nov 5, 2021
@phofl
Copy link
Member

phofl commented Nov 5, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Indexing Related to indexing on series/frames, not to indexes themselves Nested Data Data where the values are collections (lists, sets, dicts, objects, etc.).

4 participants