Skip to content

Commit

Permalink
convert median to expr_fn api
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-J-Ward committed Jun 12, 2024
1 parent 66f25ed commit 8a3a606
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ pub fn covar_pop(y: PyExpr, x: PyExpr) -> PyExpr {
functions_aggregate::expr_fn::covar_pop(y.expr, x.expr).into()
}

#[pyfunction]
pub fn median(arg: PyExpr) -> PyExpr {
functions_aggregate::expr_fn::median(arg.expr).into()
}

#[pyfunction]
pub fn covar(y: PyExpr, x: PyExpr) -> PyExpr {
// alias for covar_samp
Expand Down Expand Up @@ -583,7 +588,6 @@ aggregate_function!(count, Count);
aggregate_function!(grouping, Grouping);
aggregate_function!(max, Max);
aggregate_function!(mean, Avg);
aggregate_function!(median, Median);
aggregate_function!(min, Min);
aggregate_function!(sum, Sum);
aggregate_function!(stddev, Stddev);
Expand Down

0 comments on commit 8a3a606

Please sign in to comment.