From 14ff59914b4b3071ff7a40bf9daaba558ff66746 Mon Sep 17 00:00:00 2001 From: Primoz Date: Wed, 26 Oct 2022 09:59:46 +0000 Subject: [PATCH] Fix to correct dtypes. --- src/features/empatica_accelerometer/cr/main.py | 4 ++-- src/features/empatica_electrodermal_activity/cr/main.py | 2 +- src/features/empatica_inter_beat_interval/cr/main.py | 2 +- src/features/empatica_temperature/cr/main.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/features/empatica_accelerometer/cr/main.py b/src/features/empatica_accelerometer/cr/main.py index 332114ac..372a0e03 100644 --- a/src/features/empatica_accelerometer/cr/main.py +++ b/src/features/empatica_accelerometer/cr/main.py @@ -44,8 +44,8 @@ def extract_acc_features_from_intraday_data(acc_intraday_data, features, window_ def cr_features(sensor_data_files, time_segment, provider, filter_data_by_segment, *args, **kwargs): - data_types = {'local_timezone': 'str', 'device_id': 'str', 'timestamp': 'int64', 'double_values_0': int, - 'double_values_1': int, 'double_values_2': int, 'local_date_time': 'str', 'local_date': "str", + data_types = {'local_timezone': 'str', 'device_id': 'str', 'timestamp': 'int64', 'double_values_0': 'float64', + 'double_values_1': 'float64', 'double_values_2': 'float64', 'local_date_time': 'str', 'local_date': "str", 'local_time': "str", 'local_hour': "str", 'local_minute': "str", 'assigned_segments': "str"} acc_intraday_data = pd.read_csv(sensor_data_files["sensor_data"], dtype=data_types) diff --git a/src/features/empatica_electrodermal_activity/cr/main.py b/src/features/empatica_electrodermal_activity/cr/main.py index 8a3ac540..4f8e8379 100644 --- a/src/features/empatica_electrodermal_activity/cr/main.py +++ b/src/features/empatica_electrodermal_activity/cr/main.py @@ -45,7 +45,7 @@ def extract_eda_features_from_intraday_data(eda_intraday_data, features, window_ def cr_features(sensor_data_files, time_segment, provider, filter_data_by_segment, *args, **kwargs): - data_types = {'local_timezone': 'str', 'device_id': 'str', 'timestamp': 'int64', 'electrodermal_activity': int, 'local_date_time': 'str', + data_types = {'local_timezone': 'str', 'device_id': 'str', 'timestamp': 'int64', 'electrodermal_activity': 'float64', 'local_date_time': 'str', 'local_date': "str", 'local_time': "str", 'local_hour': "str", 'local_minute': "str", 'assigned_segments': "str"} eda_intraday_data = pd.read_csv(sensor_data_files["sensor_data"], dtype=data_types) diff --git a/src/features/empatica_inter_beat_interval/cr/main.py b/src/features/empatica_inter_beat_interval/cr/main.py index 6413f1c0..7797e329 100644 --- a/src/features/empatica_inter_beat_interval/cr/main.py +++ b/src/features/empatica_inter_beat_interval/cr/main.py @@ -51,7 +51,7 @@ def extract_ibi_features_from_intraday_data(ibi_intraday_data, features, window_ def cr_features(sensor_data_files, time_segment, provider, filter_data_by_segment, *args, **kwargs): - data_types = {'local_timezone': 'str', 'device_id': 'str', 'timestamp': 'int64', 'inter_beat_interval': int, 'timings': 'int64', 'local_date_time': 'str', + data_types = {'local_timezone': 'str', 'device_id': 'str', 'timestamp': 'int64', 'inter_beat_interval': 'float64', 'timings': 'float64', 'local_date_time': 'str', 'local_date': "str", 'local_time': "str", 'local_hour': "str", 'local_minute': "str", 'assigned_segments': "str"} temperature_intraday_data = pd.read_csv(sensor_data_files["sensor_data"], dtype=data_types) diff --git a/src/features/empatica_temperature/cr/main.py b/src/features/empatica_temperature/cr/main.py index 8dea752f..4158e7ee 100644 --- a/src/features/empatica_temperature/cr/main.py +++ b/src/features/empatica_temperature/cr/main.py @@ -37,7 +37,7 @@ def extract_temp_features_from_intraday_data(temperature_intraday_data, features def cr_features(sensor_data_files, time_segment, provider, filter_data_by_segment, *args, **kwargs): - data_types = {'local_timezone': 'str', 'device_id': 'str', 'timestamp': 'int64', 'temperature': int, 'local_date_time': 'str', + data_types = {'local_timezone': 'str', 'device_id': 'str', 'timestamp': 'int64', 'temperature': 'float64', 'local_date_time': 'str', 'local_date': "str", 'local_time': "str", 'local_hour': "str", 'local_minute': "str", 'assigned_segments': "str"} temperature_intraday_data = pd.read_csv(sensor_data_files["sensor_data"], dtype=data_types)