-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: dataframe.apply() loops on first row when applied method attempts to modify the row #35462
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
Comments
Thanks @nicolasrozain for the report. is adding |
@nicolasrozain in 1.0.5 the original DataFrame is being mutated by this function so removing the regression tag pending further discussion/investigation of correct behaviour or whether we want to restore the 1.0.5 behaviour.
|
OK so the commit that caused the change is not the one I expected. it is #34909. This PR is labelled PERF and so should not have changed behaviour. re-instating regression tag. cc @jbrockmendel 91802a9 is the first bad commit
|
I have experienced the same behaviour. Modifying a copy of the series instead of the original solved the issue in the short term. I guess i'll wait a fix before enjoying the long waited 'apply does not alterate first row twice' functionnality. Keep up the good work guys. |
Same problem for me, I feel like the 1.0.5 behavior was much better. I often use the apply method to modify rows like this, as I feel the ability to call an arbitary Python function on any row is very powerful. I'll downgrade to 1.0.5 until this is fixed. |
With pandas 1.1.0 on Python 3.6.8:
With pandas 1.0.5:
I expected the behavior of 1.0.5 in 1.1.0, did I misunderstood the apply method?
Thank you for your help.
The text was updated successfully, but these errors were encountered: