From 5f85dd8ca4e77c2e9ad062fbcb0a44c710a46343 Mon Sep 17 00:00:00 2001 From: Meng Li <34143965+Meng6@users.noreply.github.com> Date: Sun, 3 Oct 2021 16:48:32 -0400 Subject: [PATCH] Fill NA with 0 for the selected conversation features --- src/features/phone_conversation/rapids/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/phone_conversation/rapids/main.py b/src/features/phone_conversation/rapids/main.py index c842a1cf..cf9dedff 100644 --- a/src/features/phone_conversation/rapids/main.py +++ b/src/features/phone_conversation/rapids/main.py @@ -140,7 +140,7 @@ def rapids_features(sensor_data_files, time_segment, provider, filter_data_by_se if "voicemaxenergy" in features_to_compute: conversation_features["voicemaxenergy"] = conversation_data[conversation_data['inference']==2].groupby(["local_segment"])["double_energy"].max() - + conversation_features.fillna(value={feature_name: 0 for feature_name in conversation_features.columns if feature_name not in ["timefirstconversation", "timelastconversation", "sdconversationduration", "noisesdenergy", "voicesdenergy"]}, inplace=True) conversation_features = conversation_features.reset_index() return conversation_features \ No newline at end of file