snowflake.snowpark.functions.regr_syy

snowflake.snowpark.functions.regr_syy(y: Union[Column, str], x: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.30.0/snowpark-python/src/snowflake/snowpark/functions.py#L11342-L11355)

Returns REGR_COUNT(y, x) * VAR_POP(y) for non-null pairs.

Example:

>>> df = session.create_dataframe([[10, 11], [20, 22], [25, None], [30, 35]], schema=["v", "v2"])
>>> df.groupBy("v").agg(regr_syy(df["v"], df["v2"]).alias("regr_syy")).collect()
[Row(V=10, REGR_SYY=0.0), Row(V=20, REGR_SYY=0.0), Row(V=25, REGR_SYY=None), Row(V=30, REGR_SYY=0.0)]
Copy
Language: English