From 79cd975923da22a3f9a195c40f8b14a5465ed1e0 Mon Sep 17 00:00:00 2001 From: Felix Henneke Date: Tue, 3 Dec 2024 09:53:37 +0100 Subject: [PATCH] check for more variants of missing data not just None but also NaN (in cases a column is misidentified as float --- src/fetch/payouts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fetch/payouts.py b/src/fetch/payouts.py index 67816cb0..715ae0f1 100644 --- a/src/fetch/payouts.py +++ b/src/fetch/payouts.py @@ -107,12 +107,12 @@ def from_series(cls, frame: Series) -> RewardAndPenaltyDatum: ) solver = frame["solver"] reward_target = frame["reward_target"] - if reward_target is None: + if pandas.isna(reward_target): log.warning(f"Solver {solver} without reward_target. Using solver") reward_target = solver buffer_accounting_target = frame["buffer_accounting_target"] - if buffer_accounting_target is None: + if pandas.isna(buffer_accounting_target): log.warning( f"Solver {solver} without buffer_accounting_target. Using solver" )