Function calculate_rolling_sum

Source
pub fn calculate_rolling_sum(
    df: &DataFrame,
    column_name: &str,
    window: usize,
) -> PolarsResult<Series>
Expand description

Calculate the rolling sum of a column in a DataFrame

§Arguments

  • df - DataFrame containing the column
  • column_name - Name of the column to sum
  • window - Window size for the rolling sum

§Returns

Returns a PolarsResult containing the rolling sum Series