Skip to content
Snippets Groups Projects
Commit 4e51d3f6 authored by Bert Palm's avatar Bert Palm 🎇
Browse files

fixed refactor bug in scores.py

parent 4d5e76ee
No related branches found
No related tags found
4 merge requests!271Static expansion of regular expressions,!260Follow-Up Translations,!237Flagger Translations,!232WIP: Fuzzy testing
...@@ -8,6 +8,7 @@ import pandas as pd ...@@ -8,6 +8,7 @@ import pandas as pd
from dios import DictOfSeries from dios import DictOfSeries
from saqc.common import *
from saqc.core.register import register from saqc.core.register import register
from saqc.flagger import Flagger from saqc.flagger import Flagger
from saqc.lib import ts_operators as ts_ops from saqc.lib import ts_operators as ts_ops
...@@ -155,11 +156,10 @@ def assignKNNScore( ...@@ -155,11 +156,10 @@ def assignKNNScore(
score_ser[partition.index] = resids score_ser[partition.index] = resids
# this unconditionally overwrite a column, # todo: this unconditionally overwrite a column, may we should fire a warning ? -- palmb
# may we should fire a warning ? -- palmb
if target_field in flagger.columns: if target_field in flagger.columns:
flagger.drop(target_field) 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 data[target_field] = score_ser
return data, flagger return data, flagger
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