-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
inplace dropna? #1960
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
What do you think about having methods like |
doesn't the i- prefix usually indicate positional indexing? like irow, icol, and get_value vs iget_value |
I was thinking re: |
Well, now I'd associate it with iadd, but my first reaction was with indexing as well. I don't really know what to do here. It doesn't kill me to type inplace=True. I'm in the habit now and that's how I noticed dropna didn't have it. If you wanted to be cute (I don't necessarily)
|
Now that we have a different representation for NDFrame, couldn't this be as simple as doing something along the lines of:
Don't return self if inplace. That way references to the original NDFrame wrapper refer to the new object. Easy to do with Series too now that it doesn't inherit NDFrame. |
and then call finalize to copy over any other metadata. We could rely on |
see related discussion in #2325
Possible and/or desirable to add an inplace keyword to dropna? Maybe an out keyword, so you can avoid typing the assignment? [Edit: I guess out doesn't really make sense like it does for numpy ufuncs.] Don't really mind if there's a copy even I just get tired of always doing assignment to the same name when I'm doing pre-, post-processing, etc.
The text was updated successfully, but these errors were encountered: