From e2e268148d06cf97d87cf23efdabe0b7938ee239 Mon Sep 17 00:00:00 2001 From: junos Date: Sat, 21 Aug 2021 17:33:31 +0200 Subject: [PATCH] Fill in 0.5 for undefined ratio. When there are no calls and no smses (of a particular type), the ratio is undefined. But since their number is the same, I argue that the ratio can represent that with a 0.5, similarly to the case where no_calls_all = no_sms_all != 0. --- features/communication.py | 1 + 1 file changed, 1 insertion(+) diff --git a/features/communication.py b/features/communication.py index 17e73a7..8b598a3 100644 --- a/features/communication.py +++ b/features/communication.py @@ -337,5 +337,6 @@ def calls_sms_features( ) # Calculate new features and create additional columns ) + .fillna(0.5, downcast="infer") ) return count_joined