Timedelta
noun
say it: “TYM-del-tuh” /ˈtaɪmˌdɛltə/
In pandas, a length of time, such as 27 minutes 15 seconds, rather than a moment; subtracting one date from another gives one.
What is a Timedelta in pandas?
A Timedelta is pandas' type for a length of time, not a moment: such as 27 minutes 15 seconds, or 60 days
16 hours. Subtracting one date from another gives one, .dt.days gives it in whole days, and
.dt.total_seconds() as a number of seconds.
import pandas as pd
wait = pd.Timestamp("2026-10-03") - pd.Timestamp("2026-08-03 07:40")
print(wait) # 60 days 16:20:00
print(wait.days) # 60
In a sentence
- “Each finish time became a Timedelta, so the average time could be worked out.”
- “Race day minus the sign-up date gave a Timedelta of 60 days 16 hours.”
Level: Journeyman · More Python terms at this level
Updated