Skip to content

Conversation

jbrockmendel
Copy link
Member

Identified in #61732

# pc.if_else here is similar to `values[mask] = fill_value`
# but this avoids an object-dtype round-trip.
pa_values = pc.if_else(~mask, values._pa_array, fill_value)
values = type(self)(pa_values)
counts = counts.copy()
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated, but this need to be a copy (since it comes from a computed operation already)?

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 dont see why it would. will remove it in my next "assorted cleanups" branch

@mroeschke mroeschke added the Arrow pyarrow functionality label Jul 7, 2025
@mroeschke mroeschke added this to the 3.0 milestone Jul 7, 2025
@mroeschke mroeschke merged commit d21ad1a into pandas-dev:main Jul 7, 2025
48 checks passed
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the perf-explode branch July 7, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants