I am working on the following dataframe, df:
name val_1 val_2 val_3
AAA 20 25 30
BBB 15 20 35
CCC 25 40 45
DDD 20 20 25
I need to keep only that name where any val column increase by more than 10 from the previous val column. If one column increases by less than 10 from the previous column or doesn't even increase, we need to drop that name.
Desired output:
name
BBB #val3 increases by 15
CCC #val2 increases by 15
What would be the smartest way of doing it? Any suggestions would be appreciated. Thanks!