Sep 4, 2021
Sorry, I copied the code and sent the comment half-finished. What I actually wanted to write (now corrected) is
df1.do_sth(inplace=True)
Your version in the comment (df1 = df1.do_sth()) does basically the same in one line. But anyway, my point was just that there are very good reasons for NOT wanting to create copy after copy of a dataframe.