Series.
quantile
Return value at the given quantile.
Note
Unlike pandas’, the quantile in Koalas is an approximated quantile based upon approximate percentile computation because computing quantile across a large dataset is extremely expensive.
0 <= q <= 1, the quantile(s) to compute.
Default accuracy of approximation. Larger value means better accuracy. The relative error can be deduced by 1.0 / accuracy.
If the current object is a Series and q is an array, a Series will be returned where the index is q and the values are the quantiles, otherwise a float will be returned.
q
Examples
>>> s = ks.Series([1, 2, 3, 4, 5]) >>> s.quantile(.5) 3
>>> (s + 1).quantile(.5) 4
>>> s.quantile([.25, .5, .75]) 0.25 2 0.5 3 0.75 4 Name: 0, dtype: int64
>>> (s + 1).quantile([.25, .5, .75]) 0.25 3 0.5 4 0.75 5 Name: 0, dtype: int64