diff --git a/src/features/utils/resample_episodes.R b/src/features/utils/resample_episodes.R index eac57f05..a32fd97e 100644 --- a/src/features/utils/resample_episodes.R +++ b/src/features/utils/resample_episodes.R @@ -1,4 +1,5 @@ source("renv/activate.R") +library("tibble") library("dplyr") library("tidyr") library("tibble") diff --git a/src/features/utils/utils.py b/src/features/utils/utils.py index d2060aee..79c08455 100644 --- a/src/features/utils/utils.py +++ b/src/features/utils/utils.py @@ -35,7 +35,7 @@ def chunk_episodes(sensor_episodes): sensor_episodes = sensor_episodes.copy() # Unix timestamp for current segment in milliseconds - sensor_episodes[["segment_start_timestamp", "segment_end_timestamp"]] = sensor_episodes["timestamps_segment"].str.split(",", expand=True) + sensor_episodes[["segment_start_timestamp", "segment_end_timestamp"]] = sensor_episodes["timestamps_segment"].str.split(",", expand=True).astype(int) # Compute chunked timestamp sensor_episodes["chunked_start_timestamp"] = sensor_episodes[["start_timestamp", "segment_start_timestamp"]].max(axis=1)