Skip to content

Commit

Permalink
Update extracted column
Browse files Browse the repository at this point in the history
  • Loading branch information
“Aidan committed Jul 10, 2024
1 parent 1e02f22 commit 72fc969
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/asleep/get_sleep.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def get_parsed_data(raw_data_path, info_data_path, resample_hz, args):
data = data.reset_index()

# apply time shift
start_time = pd.to_datetime(info.get("StartTime", data.index[START_TIME_IDX]))
end_time = pd.to_datetime(info.get("EndTime", data.index[END_TIME_IDX]))
start_time = pd.to_datetime(info.get("StartTime", data["time"].iloc[START_TIME_IDX]))
end_time = pd.to_datetime(info.get("EndTime", data["time"].iloc[END_TIME_IDX]))
info['StartTime'] = start_time + datetime.timedelta(hours=time_shift)
info['EndTime'] = end_time + datetime.timedelta(hours=time_shift)
info['StartTime'] = info['StartTime'].strftime('%Y-%m-%d %H:%M:%S')
Expand Down

0 comments on commit 72fc969

Please sign in to comment.