From a1e46903c02b1216bc03785fe96adfc039b6a68c Mon Sep 17 00:00:00 2001 From: Peter Luenenschloss <peter.luenenschloss@ufz.de> Date: Fri, 10 Jul 2020 14:36:57 +0200 Subject: [PATCH] added just-pass-empty clause to modelling_rollingMean --- saqc/funcs/data_modelling.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/saqc/funcs/data_modelling.py b/saqc/funcs/data_modelling.py index a58934574..99bdebd96 100644 --- a/saqc/funcs/data_modelling.py +++ b/saqc/funcs/data_modelling.py @@ -186,6 +186,8 @@ def modelling_rollingMean(data, field, flagger, winsz, eval_flags=True, min_peri data = data.copy() to_fit = data[field] flags = flagger.getFlags(field) + if to_fit.empty: + return data, flagger # starting with the annoying case: finding the rolling interval centers of not-harmonized input time series: if (to_fit.index.freqstr is None) and center: -- GitLab