I want to get the value of the ‘shift’ column as an argument to the function shift
I try to
df['gg_shift']=df['gg'].shift(df['shift'])
but it doesn't work
expected result table
gg bool shift gg_shift
0.88 FALSE 0
0.87 TRUE 0
0.94 FALSE 1 0.87
0.17 FALSE 2 0.87
0.92 TRUE 0
0.51 FALSE 1 0.92
0.1 TRUE 0
0.88 FALSE 1 0.1
0.36 FALSE 2 0.1
0.14 TRUE 0