Fix PRICE provider's bug when input is an empty dataframe

feature/plugin_sentimental
Meng Li 2021-02-26 11:09:31 -05:00
parent 5c84c71f60
commit 716ff3c592
1 changed files with 3 additions and 0 deletions

View File

@ -181,6 +181,9 @@ def price_features(sensor_data_files, time_segment, provider, filter_data_by_seg
features_fullnames = featuresFullNames(intraday_features_to_compute, sleep_levels_to_compute, day_types_to_compute)
sleep_intraday_features = pd.DataFrame(columns=features_fullnames)
if sleep_intraday_data.empty:
return sleep_intraday_features
# Filter by segemnts and chunk episodes
sleep_intraday_data = filter_data_by_segment(sleep_intraday_data, time_segment)