From 4e51d3f6a06b89c953409f9a5b79581a36c9840f Mon Sep 17 00:00:00 2001
From: Bert Palm <bert.palm@ufz.de>
Date: Wed, 3 Mar 2021 13:09:33 +0100
Subject: [PATCH] fixed refactor bug in scores.py

---
 saqc/funcs/scores.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/saqc/funcs/scores.py b/saqc/funcs/scores.py
index 244f2a9e6..1c670b287 100644
--- a/saqc/funcs/scores.py
+++ b/saqc/funcs/scores.py
@@ -8,6 +8,7 @@ import pandas as pd
 
 from dios import DictOfSeries
 
+from saqc.common import *
 from saqc.core.register import register
 from saqc.flagger import Flagger
 from saqc.lib import ts_operators as ts_ops
@@ -155,11 +156,10 @@ def assignKNNScore(
 
         score_ser[partition.index] = resids
 
-    # this unconditionally overwrite a column,
-    # may we should fire a warning ? -- palmb
+    # todo: this unconditionally overwrite a column, may we should fire a warning ? -- palmb
     if target_field in flagger.columns:
         flagger.drop(target_field)
-    flagger[target_field] = score_ser
+    flagger[target_field] = pd.Series(UNFLAGGED, index=score_ser.index, dtype=float)
 
     data[target_field] = score_ser
     return data, flagger
-- 
GitLab