I want a list of timestamps ranging from 00:00:00 to 23:45:00 using pandas date_range.
I tried like this
pd.date_range(start=pd.Timestamp('00:00:00'), end=pd.Timestamp('23:45:00'), freq='15T')
Even though I haven't provided the Year, Month and Date, the output I got is like this
DatetimeIndex(['2018-09-14 00:00:00', '2018-09-14 00:15:00',
'2018-09-14 00:30:00', '2018-09-14 00:45:00',
'2018-09-14 01:00:00', '2018-09-14 01:15:00',
'2018-09-14 01:30:00', '2018-09-14 01:45:00',
'2018-09-14 02:00:00', '2018-09-14 02:15:00',
'2018-09-14 02:30:00', '2018-09-14 02:45:00',
'2018-09-14 03:00:00', '2018-09-14 03:15:00',
'2018-09-14 03:30:00', '2018-09-14 03:45:00',
'2018-09-14 04:00:00', '2018-09-14 04:15:00',
'2018-09-14 04:30:00', '2018-09-14 04:45:00',
'2018-09-14 05:00:00', '2018-09-14 05:15:00',
'2018-09-14 05:30:00', '2018-09-14 05:45:00',
'2018-09-14 06:00:00', '2018-09-14 06:15:00',
'2018-09-14 06:30:00', '2018-09-14 06:45:00',
'2018-09-14 07:00:00', '2018-09-14 07:15:00',
'2018-09-14 07:30:00', '2018-09-14 07:45:00',
'2018-09-14 08:00:00', '2018-09-14 08:15:00',
'2018-09-14 08:30:00', '2018-09-14 08:45:00',
'2018-09-14 09:00:00', '2018-09-14 09:15:00',
'2018-09-14 09:30:00', '2018-09-14 09:45:00',
'2018-09-14 10:00:00', '2018-09-14 10:15:00',
'2018-09-14 10:30:00', '2018-09-14 10:45:00',
'2018-09-14 11:00:00', '2018-09-14 11:15:00',
'2018-09-14 11:30:00', '2018-09-14 11:45:00',
'2018-09-14 12:00:00', '2018-09-14 12:15:00',
'2018-09-14 12:30:00', '2018-09-14 12:45:00',
'2018-09-14 13:00:00', '2018-09-14 13:15:00',
'2018-09-14 13:30:00', '2018-09-14 13:45:00',
'2018-09-14 14:00:00', '2018-09-14 14:15:00',
'2018-09-14 14:30:00', '2018-09-14 14:45:00',
'2018-09-14 15:00:00', '2018-09-14 15:15:00',
'2018-09-14 15:30:00', '2018-09-14 15:45:00',
'2018-09-14 16:00:00', '2018-09-14 16:15:00',
'2018-09-14 16:30:00', '2018-09-14 16:45:00',
'2018-09-14 17:00:00', '2018-09-14 17:15:00',
'2018-09-14 17:30:00', '2018-09-14 17:45:00',
'2018-09-14 18:00:00', '2018-09-14 18:15:00',
'2018-09-14 18:30:00', '2018-09-14 18:45:00',
'2018-09-14 19:00:00', '2018-09-14 19:15:00',
'2018-09-14 19:30:00', '2018-09-14 19:45:00',
'2018-09-14 20:00:00', '2018-09-14 20:15:00',
'2018-09-14 20:30:00', '2018-09-14 20:45:00',
'2018-09-14 21:00:00', '2018-09-14 21:15:00',
'2018-09-14 21:30:00', '2018-09-14 21:45:00',
'2018-09-14 22:00:00', '2018-09-14 22:15:00',
'2018-09-14 22:30:00', '2018-09-14 22:45:00',
'2018-09-14 23:00:00', '2018-09-14 23:15:00',
'2018-09-14 23:30:00', '2018-09-14 23:45:00'],
dtype='datetime64[ns]', freq='15T')
I know I can strip the needed Hour, Minute and Second value from this. But I am wondering is there are direct way for this.
Can this be done in pandas.?