snowflake.snowpark.functions.regr_slope¶
- snowflake.snowpark.functions.regr_slope(y: Union[Column, str], x: Union[Column, str]) Column[source]¶
Returns the slope of the linear regression line for non-null pairs in a group. It is computed for non-null pairs using the following formula: COVAR_POP(x,y) / VAR_POP(x), where x is the independent variable and y is the dependent variable.
Example: