Drop rows without "assigned_segments" column before feature extraction

pull/112/head
Meng Li 2021-01-21 19:41:17 -05:00
parent 797de54b34
commit 25a3492eba
1 changed files with 1 additions and 0 deletions

View File

@ -1,6 +1,7 @@
rapids_log_tag = "RAPIDS:"
def filter_data_by_segment(data, time_segment):
data.dropna(subset=["assigned_segments"], inplace=True)
if(data.shape[0] == 0): # data is empty
data["local_segment"] = data["timestamps_segment"] = None
return data