-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
ENH: add inplace-kwarg to update #21858
Comments
I think that's a pretty reasonable suggestion. |
Maybe it's just me, but the name |
@Liam3851 Python does a lot of inplace stuff ( |
@gfyoung said:
Re-pinging @jreback @TomAugspurger |
DataFrame.update is modeled after dict.update. I don't think it should ever
be non-inplace.
I don't have a strong opinion about a return value.
…On Mon, Aug 6, 2018 at 1:46 AM h-vetinari ***@***.***> wrote:
@gfyoung <https://github.com/gfyoung> said:
I think that's a pretty reasonable suggestion.
cc @jreback <https://github.com/jreback> @TomAugspurger
<https://github.com/TomAugspurger>
Re-pinging @jreback <https://github.com/jreback> @TomAugspurger
<https://github.com/TomAugspurger>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#21858 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIlizWp-XbJXZUOT3IQ5sTWvFZEzhks5uN-Y0gaJpZM4VLV0U>
.
|
Since you answered by email (and the quoted text does not contain the OP), may I ask: did you read the OP? I did discuss the relationship to Furthermore, adding a kwarg does not necessarily change the default, just provide more options. Alternatively, if |
Currently,
df.update
follows the convention ofdict.update
to return None and update inplace. This is against the prevailing trend (and philosopy?) of pandas to move away frominplace
. See for example (one among many...) @TomAugspurger's response in #21841:The
update
-method of perfoms an important function regardless of whether it returns the object or None, and so should IMO be enabled to work in chained operations as well.First step there would be adding an
inplace
-argument with defaultTrue
, and then -- potentially -- transitioning with a longish deprecation cycle towardsinplace=False
.Relevant xrefs: #21855 #21859
The text was updated successfully, but these errors were encountered: