From 932092c0e5ab96140506659b29ac0ce217477043 Mon Sep 17 00:00:00 2001 From: Enrico Zimuel Date: Thu, 24 Aug 2023 10:46:14 +0200 Subject: [PATCH] Fixed test for mean using ES 8.9.0 --- eland/series.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eland/series.py b/eland/series.py index 3779ae4..d78fe8b 100644 --- a/eland/series.py +++ b/eland/series.py @@ -1486,8 +1486,9 @@ class Series(NDFrame): Examples -------- >>> s = ed.DataFrame('http://localhost:9200', 'flights')['AvgTicketPrice'] - >>> int(s.median()) - 640 + >>> m = int(s.median()) + >>> print(m == 639 or m == 640) # required for ES >= 8.9, see https://github.com/elastic/elasticsearch/pull/96904 + True """ results = super().median(numeric_only=numeric_only) return results.squeeze()