eland.Series.median#
- Series.median(numeric_only: Optional[bool] = None) Series #
返回 Series 值的中位数
TODO - 实现 pandas 参数的剩余部分,目前不支持非数字
返回#
- float
中位数
另请参见#
示例#
>>> 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