I face problem in pandas where I perform many changes on data. But eventually I dont know which change caused the final state of value in the column.
For example I change volumes like this. But I run many checks like this one:
# Last check
for i in range(5):
df_gp.tail(1).loc[ (df_gp['volume']<df_gp['volume'].shift(1)) | (df_gp['volume']<0.4),['new_volume'] ] = df_gp['new_volume']*1.1
I want to update not only 'new_volume' column, but also column 'commentary' if the conditions are fulfilled.
Is it possible to add it somewhere, so that I 'commentary' is updated in the same time as 'new_volume'?
Thanks!