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
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: