From 97b97af2de9c3eac03e2ac802ed0330e668c6768 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Wed, 21 Apr 2021 07:09:05 +0200 Subject: [PATCH] Fix: replace np.isnan with pd.isnull --- recopytex/datalib/on_score_column.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recopytex/datalib/on_score_column.py b/recopytex/datalib/on_score_column.py index 6cedb84..6a05c89 100644 --- a/recopytex/datalib/on_score_column.py +++ b/recopytex/datalib/on_score_column.py @@ -2,7 +2,7 @@ # encoding: utf-8 from math import ceil -import numpy as np +import pandas as pd def is_none_score(x, score_config): @@ -40,7 +40,7 @@ def is_none_score(x, score_config): for v in score_config.values() if str(v["numeric_value"]).lower() == "none" ] - return x["score"] in none_values or x["score"] is None or np.isnan(x["score"]) + return x["score"] in none_values or pd.isnull(x["score"]) def score_to_numeric_score(x, score_config):