polars.LazyFrame.quantile
-
Агрегирует столбцы LazyFrame, вычисляя их квантиль.
- Параметры:
-
- quantile
-
Квантиль от 0.0 до 1.0.
-
interpolation{‘nearest’, ‘higher’, ‘lower’, ‘midpoint’, ‘linear’, ‘equiprobable’} -
Метод интерполяции.
Примеры
>>> lf = pl.LazyFrame( ... { ... "a": [1, 2, 3, 4], ... "b": [1, 2, 1, 1], ... } ... ) >>> lf.quantile(0.7).collect() shape: (1, 2) ┌─────┬─────┐ │ a ┆ b │ │ --- ┆ --- │ │ f64 ┆ f64 │ ╞═════╪═════╡ │ 3.0 ┆ 1.0 │ └─────┴─────┘
LazyFrame.quantile(
quantile: float | Expr,
interpolation: QuantileMethod = 'nearest',
) → LazyFrame
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/lazyframe/api/polars.LazyFrame.quantile.html