-
-
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
BUG: The DataFrame.apply
method does not use the extra argument list when raw=True
#55009
Closed
3 tasks done
Comments
martin-sicho
added
Bug
Needs Triage
Issue that has not been reviewed by a pandas team member
labels
Sep 5, 2023
rhshadrach
added
Apply
Apply, Aggregate, Transform, Map
and removed
Needs Triage
Issue that has not been reviewed by a pandas team member
labels
Sep 9, 2023
Thanks for the report! PR to fix is most welcome! |
martin-sicho
added a commit
to martin-sicho/pandas
that referenced
this issue
Sep 11, 2023
mroeschke
added a commit
that referenced
this issue
Sep 13, 2023
…e` to ignore passed arguments) (#55089) * fixes #55009 * update documentation * write documentation * add test * change formatting * cite DataDrame directly in docs Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
hedeershowk
pushed a commit
to hedeershowk/pandas
that referenced
this issue
Sep 20, 2023
… `DataFrame` to ignore passed arguments) (pandas-dev#55089) * fixes pandas-dev#55009 * update documentation * write documentation * add test * change formatting * cite DataDrame directly in docs Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
hedeershowk
pushed a commit
to hedeershowk/pandas
that referenced
this issue
Sep 20, 2023
… `DataFrame` to ignore passed arguments) (pandas-dev#55089) * fixes pandas-dev#55009 * update documentation * write documentation * add test * change formatting * cite DataDrame directly in docs Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
mroeschke
added a commit
that referenced
this issue
Sep 27, 2023
* add pyarrow autogenerated prefix * whats new bug fix * test with no head and pyarrow * only test pyarrow * BUG: This fixes #55009 (`raw=True` caused `apply` method of `DataFrame` to ignore passed arguments) (#55089) * fixes #55009 * update documentation * write documentation * add test * change formatting * cite DataDrame directly in docs Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * PR review feedback * Update doc/source/whatsnew/v2.2.0.rst Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> * alphabetical whatsnew --------- Co-authored-by: Martin Šícho <sichom@vscht.cz> Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
DataFrame.apply
method, ifraw=True
is specified withargs
, the extra arguments are not passed to the function and it results in this error:If
raw=False
, it works as expected. This seems to occur in version2.1.0
and up.I tracked the issue down to this line in pandas. It seems that the extra arguments are not passed to
np.apply_along_axis
. Changing the line in question to this one:made the code work as expected, but maybe there is more to it? If not, I can make a PR with these changes.
Expected Behavior
The program should not crash and print the same result in both cases.
Installed Versions
The text was updated successfully, but these errors were encountered: