I am trying to specify a date range in Python that begins on the day before the current day. However, I would like that date range to begin at 10:00:00.
This is the code I am currently using
import pandas as pd
import datetime as dt
date = dt.datetime.today() - dt.timedelta(days=1)
date_range = pd.date_range(date, freq='60min', periods=24)
However, this begins at 00:00:00. I have tried a few ways of amending the above code to get it to start at 10:00:00, but none work. Can anyone help?
To clarify: I am using Pandas because this date range is to be used as the index for a dataframe.