-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DataFrame Groupby Apply Returning Unexpected Result? #12652
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
your post is not copy-pastable, something wrong in the formatting. further you REALLY REALLY should not be mutating INSIDE an .apply. We have to ban this. it is wholly bad practice. |
It actually is copy/pasteable. Would you like a screenshot proving that? Anyways, the question is why doesn't this work, not whether this is considered good or bad practice. It comes from a question on stackoverflow and I'm trying to understand:
|
this is partially a bug, will update soon. |
I'm seeing the expected output on master. That said, I don't think tests should be added for this. One should not mutate in an apply in the first place. |
note that we do have a couple tests that lock down this behavior when we want to change it - these kinds of tests are helpful |
Alright - I'll mark as such. |
Why doesn't applying the
addColumn
function to aDataFrameGroupby
object return the expected output below?Code Sample, a copy-pasteable example if possible
Expected Output
output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: