Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
CanglongCl committed Apr 4, 2024
1 parent 5a50a68 commit d50fbfd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/polars-plan/src/dsl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ impl Expr {
}

/// Returns the `k` largest rows by given column.
///
/// For single column, use [`Expr::top_k`].
#[cfg(feature = "top_k")]
pub fn top_k_by<K: Into<Expr>, E: AsRef<[IE]>, IE: Into<Expr> + Clone, G: AsRef<[bool]>>(
self,
Expand All @@ -459,7 +461,9 @@ impl Expr {
self.apply_many_private(FunctionExpr::TopK(true), &[k], false, false)
}

/// Returns the `k` largest rows by given column.
/// Returns the `k` smallest rows by given column.
///
/// For single column, use [`Expr::bottom_k`].
#[cfg(feature = "top_k")]
pub fn bottom_k_by<K: Into<Expr>, E: AsRef<[IE]>, IE: Into<Expr> + Clone, G: AsRef<[bool]>>(
self,
Expand Down

0 comments on commit d50fbfd

Please sign in to comment.