snowflake.snowpark.functions.space

snowflake.snowpark.functions.space(n: Union[snowflake.snowpark.column.Column, str]) Column[source]

Returns a string consisting of n space characters.

Parameters:

n (ColumnOrName) – The number of space characters to return.

Returns:

A string consisting of the specified number of space characters.

Return type:

Column

Examples::
>>> from snowflake.snowpark.functions import col
>>> df = session.create_dataframe([[3], [5], [0]], schema=["n"])
>>> df.select(space(col("n")).alias("result")).collect()
[Row(RESULT='   '), Row(RESULT='     '), Row(RESULT='')]