Top k values
Description
Return the k
largest elements. This has time complexity:
O(n + k \log{}n - )
Usage
<Expr>$top_k(
k,
...,
nulls_last = FALSE,
maintain_order = FALSE,
multithreaded = TRUE
)
Arguments
k
|
Number of top values to get |
…
|
Ignored. |
nulls_last
|
Place null values last. |
maintain_order
|
Whether the order should be maintained if elements are equal. |
multithreaded
|
Sort using multiple threads. |
Value
Expr
Examples
#> shape: (5, 1)
#> ┌─────┐
#> │ a │
#> │ --- │
#> │ f64 │
#> ╞═════╡
#> │ NaN │
#> │ inf │
#> │ 6.0 │
#> │ 1.0 │
#> │ 0.0 │
#> └─────┘