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

snowflake.snowpark.functions.repeat¶

snowflake.snowpark.functions.repeat(s: Union[Column, str], n: Union[Column, int]) → Column[source]¶

Builds a string by repeating the input for the specified number of times.

Example:

>>> df = session.create_dataframe([["a"], ["b"], ["c"]], schema=["a"])
>>> df.select(repeat(col("a"), 3).alias("result")).show()
------------
|"RESULT"  |
------------
|aaa       |
|bbb       |
|ccc       |
------------
Copy