Sep 3, 2021
I agree with some things, but especially in a cloud application environment, memory optimization is absolutely key. So you absolutely want to discard previous versions of a dataframe to avoid memory errors.
The inplace=True is a space-saving way to do this.
E.g. instead of
df2 = df1.do_sth()
del df1
, you can simply do
df1 = df1.do_sth(inplace=True)
One line less, memory usage equal or even less.
And chaining is not an option in many cases. It also becomes hard to debug AND hard to read after a couple of chains.