[Python-ideas] Adding quantile to the statistics module

Nathaniel Smith njs at pobox.com
Thu Mar 15 17:42:01 EDT 2018


On Thu, Mar 15, 2018 at 12:39 PM, PLIQUE Guillaume
<guillaumeplique at gmail.com> wrote:
> Hello everyone,
>
> Sorry if this subject has already been covered in the mailing list but I
> could not find it.
>
> My question is very simple: should the `quantile` function be added to
> python `statistics` module.

This seems like a reasonable idea to me -- but be warned that there
are actually quite a few slightly-different definitions of "quantile"
in use. R supports 9 different methods of calculating quantiles
(exposed via an interesting API: their quantile function takes a type=
argument, which is an integer between 1 and 9; the default is 7). And
there's currently an open issue at numpy discussing whether numpy
implements the right approaches:
https://github.com/numpy/numpy/issues/10736
So this would require some research to decide on which definition(s)
you wanted to support.

-n

-- 
Nathaniel J. Smith -- https://vorpus.org


More information about the Python-ideas mailing list