I have a dataframe:
A B
100 0.00
50 -0.50
100 1.00
120 0.20
I would like to select shifted values on the A column based on a certain condition on the B column, so for instance if B >= 0.20 and my desired shift step is 2 I would get 100 (from B =1.00) and 50 (from B = 0.20 ), rows where B < 0.20 can be discarded.
if-elselogic? Or are we just leaving anything <0.2NaN?