I have a pandas dataframe, with a column of datetimes. I need to find the average time of this column, regardless of the date. For example, if I had
dte
----
2018-02-20 20:30:00
2018-09-03 20:30:00
2017-05-18 21:00:00
2014-11-26 21:00:00
I would expect a result of
20:45:00
I've tried simply taking the time component of the datatime objects and averaging them, a la
df['tm'].dt.time.mean()
But it gives me the following error:
TypeError: unsupported operand type(s) for +: 'datetime.time' and 'datetime.time'