-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Pandas inplace argument is not explicit True or False #14189
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
Interesting -- I agree that this is a little misleading. Unless this is the expected/desired behavior or someone has worked on fixing it already, I'd love to see if I can help. I'm a new contributor and looking for something to get my feet wet with. Would love to get the input of someone with more experience before digging in. My initial thought was a common function |
sure this is possible, you can just do:
with some tests would be great |
great, thanks @jreback ! |
For example in where method here. |
The same holds for the copy argument. Also not explicit. |
Any Serie or DataFrame method with arguments inplace != [0, False, None, [], {}] process inplace operation.
Is not explicit True or False like in the documentation.
Other methods tested: where, mask, sort_index
Any bool(arg) == True is accepted
Like: inplace='Fail' , inplace=3, inplace=[0]
Maybe is not a bug, but can generate problems if someone is not careful using positional arguments, like me.
Code Sample, a copy-pastable example if possible
Expected Output
output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: