statistics.median(data)
Return the median (middle value) of numeric data, using the common “mean of middle two” method. If data is empty, StatisticsError is raised.
The median is a robust measure of central location, and is less affected by the presence of outliers in your data. When the number of data points is odd, the middle data point is returned:
>>> median([1, 3, 5])
3
When the number of data points is even, the median is interpolated by taking the average of the two middle v