Function calculate_rolling_avg

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

Calculate the rolling average of a column in a DataFrame

§Arguments

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

§Returns

Returns a PolarsResult containing the rolling average Series