On Sat, Apr 27, 2019 at 6:10 AM Steven D'Aprano wrote:
> The statistics module is soon to get a quantile function.
>
> For those of you who use statistics software (whether in Python, or
> using other languages) and specifically use quantiles, what sort of
> functionality would be useful to you?
Calling upon ol' Guidos Time Machinne:
In [31]: def create(val1):
...: data = {
...: **({"val1": "me here"} if val1 else {})
...: }
...: return data
...:
In [32]: create(False)
Out[32]: {}
In [33]: create(True)
Out[33]: {'val1': 'me here'}
Now, please, just mo
yes, this can already be done, and yes, mapping unpacking is little used (I
never think to use it). But in this case, it's a no-op, not sure the point.
I get the same thing with just the ternary expression:
In [11]: def create(val1):
...: data = {"val1": "me here"} if val1 else {}
...:
The statistics module is soon to get a quantile function.
For those of you who use statistics software (whether in Python, or
using other languages) and specifically use quantiles, what sort of
functionality would be useful to you?
For example:
- evenly-spaced quantiles (say, at 0.25, 0.5, 0.7