pub fn and(lhs: &BooleanArray, rhs: &BooleanArray) -> BooleanArray
Available on crate feature
compute_boolean
only.Expand description
Performs &&
operation on two BooleanArray
, combining the validities.
§Panics
This function panics iff the arrays have different lengths.
§Examples
use polars_arrow::array::BooleanArray;
use polars_arrow::compute::boolean::and;
let a = BooleanArray::from(&[Some(false), Some(true), None]);
let b = BooleanArray::from(&[Some(true), Some(true), Some(false)]);
let and_ab = and(&a, &b);
assert_eq!(and_ab, BooleanArray::from(&[Some(false), Some(true), None]));