ID EN
Statistics

median_high

Python 3.11

Return the high median of data. If data is empty, StatisticsError is raised. data can be a sequence or iterable.

Syntax

PYTHON
statistics.median_high(data)

Examples

Example 1
PYTHON
>>> median_high([1, 3, 5])
3
>>> median_high([1, 3, 5, 7])
5

See Also

StatisticsError