From 7626ec6307b15228d9573e7a6db021b03ed5f4ac Mon Sep 17 00:00:00 2001 From: Alexander R Date: Fri, 27 Nov 2026 14:23:35 +0200 Subject: [PATCH] Update the NaN example output in the `statistics` docs (GH-162729) (cherry picked from commit 8d4c96e5e087afebc5953e49eadd9d1e266cf092) Co-authored-by: Alexander R --- Doc/library/statistics.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/statistics.rst b/Doc/library/statistics.rst index 89e597a19b2d54..1caeeab75d7b97 100644 --- a/Doc/library/statistics.rst +++ b/Doc/library/statistics.rst @@ -50,9 +50,9 @@ functions:: >>> data = [20.7, float('NaN'),19.2, 18.3, float('NaN'), 14.4] >>> sorted(data) # This has surprising behavior - [20.7, nan, 14.4, 18.3, 19.2, nan] + [18.3, nan, 14.4, 20.7, nan, 19.2] >>> median(data) # This result is unexpected - 16.35 + 17.55 >>> sum(map(isnan, data)) # Number of missing values 2