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

snowflake.snowpark.functions.uniform

snowflake.snowpark.functions.uniform(min_: ColumnOrName | int | float, max_: ColumnOrName | int | float, gen: ColumnOrName | int | float) Column[source]

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)]
Copy