With the help of this answer, I can calculate the average of a list of timedeltas in Python.
timedeltas = [ ... ]
# giving datetime.timedelta(0) as the start value makes sum work on tds
average_timedelta = sum(timedeltas, datetime.timedelta(0)) / len(timedeltas)
Is there a solution for obtaining the median of timedeltas in a list?