This is my DataFrame
Date Time Value
16.02.2020 21:00:00 0.05012
16.02.2020 22:00:00 0.04285
16.02.2020 23:00:00 0.03559
17.02.2020 0:00:00 0.02833
17.02.2020 1:00:00 0.02107
17.02.2020 2:00:00 0.01380
17.02.2020 3:00:00 0.00654
17.02.2020 4:00:00 -0.00073
17.02.2020 5:00:00 -0.00799
17.02.2020 6:00:00 -0.01526
17.02.2020 7:00:00 -0.02252
17.02.2020 8:00:00 -0.02978
17.02.2020 9:00:00 -0.03704
17.02.2020 10:00:00 -0.04430
17.02.2020 11:00:00 -0.05156
How to find rows where Value crosses Zero? I can do it with iterating:
if current value > 0 and previous value < 0,
or
current value < 0 and previous value > 0,
so it is zero-crossing.
But my dataframe is very large. How to do it without iterating?