nimble.calculate.quartiles

nimble.calculate.quartiles(values)

A vector’s lower quartile, the median, and the upper quartile.

Return a 3-tuple (lowerQuartile, median, upperQuartile). This function requires numeric data and ignores any NaN values. Non-numeric values will results in NaN being returned.

Parameters:

values (nimble Base object) – Must be one-dimensional.

See also

median

Examples

>>> lst = [1, 5, 12, 13, 14, 21, 23, float('nan')]
>>> vector = nimble.data(lst)
>>> quartiles(vector)
(8.5, 13.0, 17.5)