Function calculate_sma

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

Calculates Simple Moving Average (SMA)

§Arguments

  • df - DataFrame containing the input data
  • column - Column name to calculate SMA on
  • window - Window size for the SMA

§Returns

Returns a PolarsResult containing the SMA Series