snowflake.snowpark.functions.regr_valy¶
- snowflake.snowpark.functions.regr_valy(y: Union[snowflake.snowpark.column.Column, str], x: Union[snowflake.snowpark.column.Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.48.0/src/snowflake/snowpark/_functions/scalar_functions.py#L4537-L4559)¶
Returns the y value for each row where x is not None. If x is None, returns None. This function is used in linear regression calculations to get the dependent variable values for valid data points.
- Parameters:
y (ColumnOrName) – The dependent variable column or column name.
x (ColumnOrName) – The independent variable column or column name.
- Returns:
A column containing the y values where x is not None, None otherwise.
- Return type:
- Examples::