-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
GroupBy transform() is surprisingly slow #2121
Comments
Ok, to be fair, the DataFrame comes out unsorted from my function while transform() preserves the sort order of the original index:
Still, even with having to sort the index, transform() is much slower:
|
Can you produce a test data set for me to look at this? |
Sure. Here it is, quick and dirty.
|
closed by #3145 |
Thanks Jeff |
I came across a strange slowness in GroupBy transform() function. I put together a simple function to avoid using apply() because it can be REALLY slow:
Now I observe the following for the two equivalent ways of doing the same thing:
That was unexpected. Am I doing something wrong in using transform()?
The text was updated successfully, but these errors were encountered: