Fix minor bug of conversation_base.py

pull/95/head
Meng Li 2020-06-29 20:29:49 -04:00
parent 47369c4b2d
commit 234dfec1fa
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ def base_conversation_features(conversation_data, day_segment, requested_feature
if not conversation_data.empty: if not conversation_data.empty:
conversation_features = pd.DataFrame() conversation_features = pd.DataFrame()
conversation_data = conversation_data.drop_duplicates(subset = 'local_time', keep= first) conversation_data = conversation_data.drop_duplicates(subset="local_time", keep="first")
if "minutessilence" in features_to_compute: if "minutessilence" in features_to_compute:
conversation_features["conversation_" + day_segment + "_minutessilence"] = conversation_data[conversation_data['inference']==0].groupby(["local_date"])['inference'].count()/60 conversation_features["conversation_" + day_segment + "_minutessilence"] = conversation_data[conversation_data['inference']==0].groupby(["local_date"])['inference'].count()/60