Fill NA with 0 for the selected conversation features

data_cleaning
Meng Li 2021-10-03 16:48:32 -04:00
parent 9cbc67c8ec
commit 5f85dd8ca4
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ def rapids_features(sensor_data_files, time_segment, provider, filter_data_by_se
if "voicemaxenergy" in features_to_compute: if "voicemaxenergy" in features_to_compute:
conversation_features["voicemaxenergy"] = conversation_data[conversation_data['inference']==2].groupby(["local_segment"])["double_energy"].max() 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() conversation_features = conversation_features.reset_index()
return conversation_features return conversation_features