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

Merge branch 'bugfix-spikes_basic' into 'master'

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

See merge request !8
parents 67adcd9d 3a094824
No related branches found
No related tags found
1 merge request!8implemented simple do-nothing if theres nothing to do bugfix if clause thingy
Pipeline #2388 passed with stage
in 6 minutes and 47 seconds
......@@ -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