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")
| 4497 | return new_collection(expr.RenameSeries(self, index, sorted_index)) |
| 4498 | |
| 4499 | def quantile(self, q=0.5, method="default"): |
| 4500 | """Approximate quantiles of Series |
| 4501 | |
| 4502 | Parameters |
| 4503 | ---------- |
| 4504 | q : list/array of floats, default 0.5 (50%) |
| 4505 | Iterable of numbers ranging from 0 to 1 for the desired quantiles |
| 4506 | method : {'default', 'tdigest', 'dask'}, optional |
| 4507 | What method to use. By default will use dask's internal custom |
| 4508 | algorithm (``'dask'``). If set to ``'tdigest'`` will use tdigest |
| 4509 | for floats and ints and fallback to the ``'dask'`` otherwise. |
| 4510 | """ |
| 4511 | _raise_if_object_series(self, "quantile") |
| 4512 | allowed_methods = ["default", "dask", "tdigest"] |
| 4513 | if method not in allowed_methods: |
| 4514 | raise ValueError("method can only be 'default', 'dask' or 'tdigest'") |
| 4515 | return new_collection(SeriesQuantile(self, q, method)) |
| 4516 | |
| 4517 | @derived_from(pd.Series) |
| 4518 | def median(self): |
no test coverage detected