Description
Currently, df.update
follows the convention of dict.update
to return None and update inplace. This is against the prevailing trend (and philosopy?) of pandas to move away from inplace
. See for example (one among many...) @TomAugspurger's response in #21841:
Generally, we're moving away from inplace operations. It's confusing whether inplace means no copy or not. Reindex, by definition, can't be inplace unless the index is the same.
We recommend chaining your method calls, and hope to provide better memory control in the future.
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 default True
, and then -- potentially -- transitioning with a longish deprecation cycle towards inplace=False
.