Skip to content

Commit 8d4c96e

Browse files
authored
Update the NaN example output in the statistics docs (#162729)
1 parent eb03dbd commit 8d4c96e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Doc/library/statistics.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ functions::
4747

4848
>>> data = [20.7, float('NaN'),19.2, 18.3, float('NaN'), 14.4]
4949
>>> sorted(data) # This has surprising behavior
50-
[20.7, nan, 14.4, 18.3, 19.2, nan]
50+
[18.3, nan, 14.4, 20.7, nan, 19.2]
5151
>>> median(data) # This result is unexpected
52-
16.35
52+
17.55
5353

5454
>>> sum(map(isnan, data)) # Number of missing values
5555
2

0 commit comments

Comments
 (0)