I am really confused by below two cases on how the variable works in Python:
Case1: This case works as I expected: a keep as 1, doesn't matter it is in the function or out of the function
Case2: This case really makes me confused: why df1 is changed? I expect to save the change to df2, and df1 is kept as the original dataframe, which is important for the following process.
May I ask for your help on case 2: how to keep df1 as the original dataframe? Thanks.