In pandas I have a TimedeltaIndex named durations
print(durations)
TimedeltaIndex(['05:00:00', '11:15:00', '07:30:00'], dtype='timedelta64[ns]', name='Date', freq=None)
Is it possible just to print each element of the TimedeltaIndex individually?
For example if I print durations[0]
this will output:
Timedelta('0 days 05:00:00')
What would I need to print just 05:00:00
without any associated Timedelta information?
EDIT possible solution? Create empty list..
stuff = []
stuff = durations.index.astype(str).str[-8:-3]
Now it seems like I can print each element of the list:
stuff[0]
stuff[1]
returns:
'00:00'
'05:00'