Skip to content

Commit

Permalink
Make them look the same
Browse files Browse the repository at this point in the history
  • Loading branch information
Sukhil Patel authored and Sukhil Patel committed Aug 14, 2024
1 parent bded8db commit 09d5e09
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ocf_data_sampler/select/fill_time_periods.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

def fill_time_periods(time_periods: pd.DataFrame, freq: pd.Timedelta):
start_dts = pd.to_datetime(time_periods["start_dt"].values).ceil(freq)
end_dts = pd.to_datetime(time_periods['end_dt'])
end_dts = pd.to_datetime(time_periods["end_dt"].values)
date_ranges = [pd.date_range(start_dt, end_dt, freq=freq) for start_dt, end_dt in zip(start_dts, end_dts)]

return pd.DatetimeIndex(np.concatenate(date_ranges))

0 comments on commit 09d5e09

Please sign in to comment.