median of panda datetime64 column
问题 Is there a way to compute and return in datetime format the median of a datetime column? I want to calculate the median of a column in python which is in datetime64[ns] format. Below is a sample to the column: df['date'].head() 0 2017-05-08 13:25:13.342 1 2017-05-08 16:37:45.545 2 2017-01-12 11:08:04.021 3 2016-12-01 09:06:29.912 4 2016-06-08 03:16:40.422 Name: recency, dtype: datetime64[ns] My aim is to have the median in same datetime format as the date column above: Tried converting to np