eland.Series.median#

Series.median(numeric_only: Optional[bool] = None) Series#

Return the median of the Series values

TODO - implement remainder of pandas arguments, currently non-numerics are not supported

Returns#

float

median value

See Also#

pandas.Series.median

Examples#

>>> s = ed.DataFrame('http://localhost:9200', 'flights')['AvgTicketPrice']
>>> m = int(s.median())
>>> print(m == 639 or m == 640) # required for ES >= 8.9, see https://github.com/elastic/elasticsearch/pull/96904
True