I want Split one row into multiple rows of 6 hours data based on 15 mins time interval in pandas data frame
start_time end_time
0 2022-08-22 00:15:00 2022-08-22 06:15:00
I have tried one hrs time split and used below code
result['start_time'] = result.apply(lambda d: pd.date_range(d['start_time'],
d['end_time'],
freq='h')[:-1],
axis=1)
and it worked for me to get this
result["start_time"][0]
Output:
DatetimeIndex(['2022-08-22 00:15:00', '2022-08-22 01:15:00',
'2022-08-22 02:15:00', '2022-08-22 03:15:00',
'2022-08-22 04:15:00', '2022-08-22 05:15:00'],
dtype='datetime64[ns]', freq='H')
now i want the frequency for 15 mins time interval, so it should give me 24 timestamp