Function polars::prelude::group_by_windows

source ยท
pub fn group_by_windows(
    window: Window,
    time: &[i64],
    closed_window: ClosedWindow,
    tu: TimeUnit,
    tz: &Option<String>,
    include_lower_bound: bool,
    include_upper_bound: bool,
    start_by: StartBy
) -> (Vec<[u32; 2]>, Vec<i64>, Vec<i64>)
Available on crate feature temporal only.
Expand description

Based on the given Window, which has an

  • every
  • period
  • offset window boundaries are created. And every window boundary we search for the values that fit that window by the given ClosedWindow. The groups are return as GroupTuples together with the lower bound and upper bound timestamps. These timestamps indicate the start (lower) and end (upper) of the window of that group.

If include_boundaries is false those lower and upper vectors will be empty.