snowflake.snowpark.functions.space

snowflake.snowpark.functions.space(n: Union[snowflake.snowpark.column.Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.48.0/src/snowflake/snowpark/_functions/scalar_functions.py#L5171-L5189)

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='')]