-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
REGR: df.apply('any', axis=1) fails with ValueError #48656
Labels
Apply
Apply, Aggregate, Transform, Map
Regression
Functionality that used to work in a prior pandas version
Milestone
Comments
vnlitvinov
added
Bug
Needs Triage
Issue that has not been reviewed by a pandas team member
labels
Sep 20, 2022
MarcoGorelli
added
the
Regression
Functionality that used to work in a prior pandas version
label
Sep 20, 2022
Thanks @vnlitvinov for the report, looks like this was caused by #44896 |
Yep, can confirm:
|
MarcoGorelli
removed
Bug
Needs Triage
Issue that has not been reviewed by a pandas team member
labels
Sep 20, 2022
5 tasks
hauntsaninja
added a commit
to hauntsaninja/pandas
that referenced
this issue
Sep 26, 2022
Fixes pandas-dev#48656. Builds on top of pandas-dev#48693. An alternative fix could be to use `inspect.signature`, since `inspect.signature` defaults to following wrapped functions. But this seems like a more minimal change.
1 task
Closed
3 tasks
Hey @vnlitvinov Thanks for having reported this - there's now a release candidate for pandas 2.0.0, which you can install with
or
If you try it out and report bugs, then we can fix them before the final 2.0.0 release |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Apply
Apply, Aggregate, Transform, Map
Regression
Functionality that used to work in a prior pandas version
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
When running the snippet above, pandas 1.5 produces the following stack trace:
I believe the root cause is this chunk of code:
pandas/pandas/core/apply.py
Lines 550 to 556 in c68a96f
which should get the signature of
pandas.DataFrame.any
but, as.any()
is decorated:pandas/pandas/core/generic.py
Lines 11629 to 11647 in c68a96f
it gets the signature of the decorator function instead.
Expected Behavior
The snippet above is printing the following when run on pandas 1.4.4:
I believe it should print the same on 1.5.x, too.
Installed Versions
pd.show_versions()
The text was updated successfully, but these errors were encountered: