-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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: Replaced ValueError exception with TypeError exception in df.where() function #56358
Conversation
Added an example for standard functions for the map function
Added documentation for extra keyword arguments in the map method
Used round function instead of defining a function in the example
…nction Replaced ValueError exception with TypeError as it is more appropriate for the error it serves
Thanks for the PR! Looks like the tests need adjusted too. |
Yeah I'm super confused because I literally only changed two keywords in the entire file and there was no way it messed up so much that 27 tests failed. Will I have to re-Pr this or will you guys fix the test stuff? Or do I need to change anything in my PR? |
We test that the correct error message is raised, and you're changing that behavior. Here is an example of a failing test: https://github.com/pandas-dev/pandas/actions/runs/7110780716/job/19357783827?pr=56358#step:8:1536
Your change now makes it so that a |
ohh that actually makes a lot of sense. this is my first time contributing to a codebase (did some documentation work in the past) so I had no idea about the testing methods. Do I have to modify those tests in this PR or is that something that the moderators take care of? |
The tests need to be modified so that they're passing in this PR. |
@DarthKitten2130 Are you still working on it? |
Yeah actually I'm in the process of modifying the tests. Please do not close this PR I just haven't been finding the time. |
Replaced ValueError exception with TypeError as it is more appropriate for the error it serves