Skip to content

DOC: clarify dangers of fast apply in GroupBy apply docs #14180

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

Closed
tambu-j opened this issue Sep 7, 2016 · 3 comments
Closed

DOC: clarify dangers of fast apply in GroupBy apply docs #14180

tambu-j opened this issue Sep 7, 2016 · 3 comments

Comments

@tambu-j
Copy link

tambu-j commented Sep 7, 2016

I recently had to solve an issue where some code was behaving inconsistently. Effectively, I tracked this issue to a function that was being passed to apply which occasionally, under certain circumstances, mutated the input for a group - and not always the first group. Because fast_apply only checks the first group this meant that the output was unreliable. It didn't take me long to work out, but from a user's point of view it would be good to extend the docs so that they clarify that mutating the input is either not a good idea, or it should occur consistently for each group (or at the very least always for the first group).

@jreback
Copy link
Contributor

jreback commented Sep 7, 2016

mutation is simply not a good idea on groupby
would appreciate a big doc warning (maybe sub section if u have a smallish example)

fast apply is an impl detail

@jreback jreback added this to the Next Major Release milestone Sep 8, 2016
@bashtage
Copy link
Contributor

bashtage commented Sep 8, 2016

I think #13543 might be related, although the opposite problem (fast works as expected, slow does not)

pdpark pushed a commit to pdpark/pandas that referenced this issue Jan 7, 2018
pdpark pushed a commit to pdpark/pandas that referenced this issue Jan 10, 2018
pdpark pushed a commit to pdpark/pandas that referenced this issue Jan 10, 2018
@jreback jreback modified the milestones: Next Major Release, 0.23.0 Jan 11, 2018
pdpark pushed a commit to pdpark/pandas that referenced this issue Jan 12, 2018
@jreback jreback modified the milestones: 0.23.0, Next Major Release Apr 14, 2018
pdpark pushed a commit to pdpark/pandas that referenced this issue Oct 16, 2018
@jbrockmendel
Copy link
Member

fast_apply has been removed; closing

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

Successfully merging a pull request may close this issue.

6 participants