Sha256: 7401b1c0262577243cf0bc77d8e8ba7012f0c81393200685160db4dbb8e4740b

Contents?: true

Size: 1.23 KB

Versions: 7

Compression:

Stored size: 1.23 KB

Contents

use magnus::RArray;
use polars::lazy::dsl;

use crate::rb_exprs_to_exprs;
use crate::{RbExpr, RbPolarsErr, RbResult};

pub fn all_horizontal(exprs: RArray) -> RbResult<RbExpr> {
    let exprs = rb_exprs_to_exprs(exprs)?;
    let e = dsl::all_horizontal(exprs).map_err(RbPolarsErr::from)?;
    Ok(e.into())
}

pub fn any_horizontal(exprs: RArray) -> RbResult<RbExpr> {
    let exprs = rb_exprs_to_exprs(exprs)?;
    let e = dsl::any_horizontal(exprs).map_err(RbPolarsErr::from)?;
    Ok(e.into())
}

pub fn max_horizontal(exprs: RArray) -> RbResult<RbExpr> {
    let exprs = rb_exprs_to_exprs(exprs)?;
    let e = dsl::max_horizontal(exprs).map_err(RbPolarsErr::from)?;
    Ok(e.into())
}

pub fn min_horizontal(exprs: RArray) -> RbResult<RbExpr> {
    let exprs = rb_exprs_to_exprs(exprs)?;
    let e = dsl::min_horizontal(exprs).map_err(RbPolarsErr::from)?;
    Ok(e.into())
}

pub fn sum_horizontal(exprs: RArray) -> RbResult<RbExpr> {
    let exprs = rb_exprs_to_exprs(exprs)?;
    let e = dsl::sum_horizontal(exprs).map_err(RbPolarsErr::from)?;
    Ok(e.into())
}

pub fn mean_horizontal(exprs: RArray) -> RbResult<RbExpr> {
    let exprs = rb_exprs_to_exprs(exprs)?;
    let e = dsl::mean_horizontal(exprs).map_err(RbPolarsErr::from)?;
    Ok(e.into())
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
polars-df-0.15.0 ext/polars/src/functions/aggregation.rs
polars-df-0.14.0 ext/polars/src/functions/aggregation.rs
polars-df-0.13.0 ext/polars/src/functions/aggregation.rs
polars-df-0.12.0 ext/polars/src/functions/aggregation.rs
polars-df-0.11.0 ext/polars/src/functions/aggregation.rs
polars-df-0.10.0 ext/polars/src/functions/aggregation.rs
polars-df-0.9.0 ext/polars/src/functions/aggregation.rs