Skip to content
Snippets Groups Projects
Commit 3a094824 authored by Peter Lünenschloß's avatar Peter Lünenschloß
Browse files

implemented simple do-nothing if theres nothing to do bugfix if clause thingy

parent 67adcd9d
No related branches found
No related tags found
No related merge requests found
......@@ -214,6 +214,8 @@ def flagSpikes_basic(data, field, flagger, thresh=7, tolerance=0, window="15min"
# get all the entries preceding a significant jump
pre_jumps = dataseries.diff(periods=-1).abs() > thresh
pre_jumps = pre_jumps[pre_jumps]
if pre_jumps.empty:
return data, flagger
# get all the entries preceeding a significant jump and its successors within "length" range
to_roll = pre_jumps.reindex(dataseries.index, method="ffill", tolerance=window, fill_value=False).dropna()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment