-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
DataFrameGroupBy.progress_apply not always equal to DataFrameGroupBy.apply #697
Comments
I believe this is because pandas apply does an internal check for whether the method passed was in a predefined list. If so, the method actually applied is not actually the method passed. For instance, From https://github.com/tqdm/tqdm/blob/master/tqdm/_tqdm.py#L668
From https://github.com/pandas-dev/pandas/blob/master/pandas/core/groupby/groupby.py#L667
Thus, |
thanks @mikekutzma - is there any way around this? Giving the wrapper function the same name as the wrapped one? |
@casperdcl You can assign this to me and I'll take a look, unless you've already started work on it. |
@mikekutzma go for it - github won't allow me to assign you though, though of course you can always open a PR. |
Applied func will be checked against pandas internal builtins in order to apply proper transformation, i.e max->amax Closes:tqdm#697
Applied func will be checked against pandas internal builtins in order to apply proper transformation, i.e max->amax Closes:tqdm#697
Applied func will be checked against pandas internal builtins in order to apply proper transformation, i.e max->amax Closes:#697
read the [known issues]
environment, where applicable:
tqdm version: 4.31.1
Python version: 3.7.1
OS Version: Ubuntu 16.04
Context:
Observed:
Expected:
df.groupby('a').apply(max)
anddf.groupby('a').progress_apply(max)
return the same value.Additional information:
Replacing
max
bysum
returns normal result forapply
, but throws this error forprogress_apply
:The text was updated successfully, but these errors were encountered: