-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Bug: Don't intercept TypeError in DataFrame.agg #49399
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
Comments
So just to confirm all we want to do is delete lines 737-742 ? Or do we have to add more specific ways to intercept type errors? |
That's correct; since this can raise for e.g. a user-defined function, I don't believe we can be any more helpful than just allowing the normal error to raise. |
take |
I would like to work on this for a school project |
@sarvaSanjay If you are not updating the test for this, I'll take it. Please let me know. |
take |
@rhshadrach #49969 PR closes this. Please review. |
pandas/pandas/core/apply.py
Lines 735 to 745 in 3370c81
We intercept any TypeError and reword the message to be about the DataFrame constructor. This likely made sense before, but with the code being refactored and #43741, TypeErrors can occur for many different reasons. We should just remove the
except
block above.The text was updated successfully, but these errors were encountered: