snowflake.snowpark.modin.plugin.extensions.window_overrides.Expanding.var¶
- Expanding.var(ddof: int = 1, numeric_only: bool = False, engine: Optional[Literal['cython', 'numba']] = None, engine_kwargs: Optional[dict[str, bool]] = None)[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.42.0/src/snowflake/snowpark/modin/plugin/extensions/window_overrides.py#L562-L579)¶
- Compute the expanding var. - Parameters:
- numeric_only (bool, default False) – Include only float, int, boolean columns. 
- ddof (int, default 1) – Delta Degrees of Freedom. The divisor used in calculations is - N - ddof, where- Nrepresents the number of elements.
- engine (str, default None None) – - 'cython': Runs the operation through C-extensions from cython.
- 'numba': Runs the operation through JIT compiled code from numba.
- None: Defaults to- 'cython'or globally setting- compute.use_numba
 - This parameter is ignored in Snowpark pandas. The execution engine will always be Snowflake. 
- engine_kwargs (dict, default None None) – - For - 'cython'engine, there are no accepted- engine_kwargs
- For 'numba'engine, the engine can acceptnopython,nogil
- and - paralleldictionary keys. The values must either be- Trueor- False. The default- engine_kwargsfor the- 'numba'engine is- {'nopython': True, 'nogil': False, 'parallel': False}.
 
- For 
 - This parameter is ignored in Snowpark pandas. The execution engine will always be Snowflake. 
- None – 
 
- Returns:
- Computed expanding var of values. 
- Return type:
 - Examples - >>> df = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]}) >>> df B 0 0.0 1 1.0 2 2.0 3 NaN 4 4.0 >>> df.expanding(2).var() B 0 NaN 1 0.500000 2 1.000000 3 1.000000 4 2.916667