You are viewing documentation about an older version (1.16.0). View latest version

snowflake.snowpark.functions.stddev_samp

snowflake.snowpark.functions.stddev_samp(e: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L945-L960)

Returns the sample standard deviation (square root of sample variance) of non-NULL values. If all records inside a group are NULL, returns NULL. Alias of stddev().

Example::
>>> from snowflake.snowpark.types import DecimalType
>>> df = session.create_dataframe(
...     [4, 9],
...     schema=["N"],
... ).select(stddev_samp(col("N")).cast(DecimalType(scale=4)))
>>> df.collect()
[Row(CAST (STDDEV_SAMP("N") AS NUMBER(38, 4))=Decimal('3.5355'))]
Copy
Language: English