MCPcopy Create free account
hub / github.com/dask/dask / quantile

Method quantile

dask/dataframe/dask_expr/_collection.py:4518–4534  ·  view source on GitHub ↗

Approximate quantiles of Series Parameters ---------- q : list/array of floats, default 0.5 (50%) Iterable of numbers ranging from 0 to 1 for the desired quantiles method : {'default', 'tdigest', 'dask'}, optional What method to use. By defaul

(self, q=0.5, method="default")

Source from the content-addressed store, hash-verified

4516 return new_collection(expr.RenameSeries(self, index, sorted_index))
4517
4518 def quantile(self, q=0.5, method="default"):
4519 """Approximate quantiles of Series
4520
4521 Parameters
4522 ----------
4523 q : list/array of floats, default 0.5 (50%)
4524 Iterable of numbers ranging from 0 to 1 for the desired quantiles
4525 method : {'default', 'tdigest', 'dask'}, optional
4526 What method to use. By default will use dask's internal custom
4527 algorithm (``'dask'``). If set to ``'tdigest'`` will use tdigest
4528 for floats and ints and fallback to the ``'dask'`` otherwise.
4529 """
4530 _raise_if_object_series(self, "quantile")
4531 allowed_methods = ["default", "dask", "tdigest"]
4532 if method not in allowed_methods:
4533 raise ValueError("method can only be 'default', 'dask' or 'tdigest'")
4534 return new_collection(SeriesQuantile(self, q, method))
4535
4536 @derived_from(pd.Series)
4537 def median(self):

Callers 2

median_approximateMethod · 0.95
quantileMethod · 0.45

Calls 3

_raise_if_object_seriesFunction · 0.90
new_collectionFunction · 0.90
SeriesQuantileClass · 0.90

Tested by

no test coverage detected