snowflake.snowpark.functions.uniform¶
- snowflake.snowpark.functions.uniform(min_: Union[Column, str, int, float], max_: Union[Column, str, int, float], gen: Union[Column, str, int, float]) Column [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L1527-L1559)¶
Returns a uniformly random number.
- Example::
>>> import datetime >>> df = session.create_dataframe( ... [[1]], ... schema=["a"], ... ) >>> df.select(uniform(1, 100, col("a")).alias("UNIFORM")).collect() [Row(UNIFORM=62)]