Skip to content

Commit db56f96

Browse files
taleinatmiss-islington
authored andcommitted
bpo-33573: docs to suggest median() alternatives for non-numeric data (pythonGH-7587)
(cherry picked from commit fdd6e0b) Co-authored-by: Tal Einat <taleinat+github@gmail.com>
1 parent 80f1a90 commit db56f96

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎Doc/library/statistics.rst‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ However, for reading convenience, most of the examples show sorted sequences.
169169
This is suited for when your data is discrete, and you don't mind that the
170170
median may not be an actual data point.
171171

172+
If your data is ordinal (supports order operations) but not numeric (doesn't
173+
support addition), you should use :func:`median_low` or :func:`median_high`
174+
instead.
175+
172176
.. seealso:: :func:`median_low`, :func:`median_high`, :func:`median_grouped`
173177

174178

0 commit comments

Comments
 (0)