Skip to content

BUG / CoW: Series.transform not respecting CoW #53747

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 1 commit into from
Jun 21, 2023

Conversation

phofl
Copy link
Member

@phofl phofl commented Jun 20, 2023

Could think about back porting, but I wouldn't do it at this point

@phofl phofl added this to the 2.1 milestone Jun 20, 2023
@phofl phofl requested a review from jorisvandenbossche June 20, 2023 20:35
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Thanks! Agreed with keeping this for 2.1.0 at this stage

@jorisvandenbossche jorisvandenbossche changed the title CoW: Series.transform not respecting CoW BUG / CoW: Series.transform not respecting CoW Jun 21, 2023
@jorisvandenbossche jorisvandenbossche merged commit 012575a into pandas-dev:main Jun 21, 2023
@phofl phofl deleted the cow_transform branch June 21, 2023 15:00
punndcoder28 pushed a commit to punndcoder28/pandas that referenced this pull request Jun 21, 2023
Daquisu pushed a commit to Daquisu/pandas that referenced this pull request Jul 8, 2023
@rhshadrach
Copy link
Member

No objection here - mainly because the fix is so simple. But in general we don't support UDFs that mutate the object:

https://pandas.pydata.org/pandas-docs/dev/user_guide/gotchas.html#mutating-with-user-defined-function-udf-methods

If we want to revisit this then I'm certainly open, but otherwise I don't think we should go out of our way to support this anti-pattern.

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

Successfully merging this pull request may close these issues.

3 participants