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

snowflake.snowpark.functions.char

snowflake.snowpark.functions.char(col: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L3037-L3057)

Converts a Unicode code point (including 7-bit ASCII) into the character that matches the input Unicode.

Example:

>>> df = session.create_dataframe([83, 33, 169, 8364, None], schema=['a'])
>>> df.select(df.a, char(df.a).as_('char')).sort(df.a).show()
-----------------
|"A"   |"CHAR"  |
-----------------
|NULL  |NULL    |
|33    |!       |
|83    |S       |
|169   |©       |
|8364  |€       |
-----------------
Copy
Language: English