pyspark.sql.functions.collation#
- pyspark.sql.functions.collation(col)[source]#
Returns the collation name of a given column.
New in version 4.0.0.
- Parameters
- col
Column
or str Target string column to work on.
- col
- Returns
Column
collation name of a given expression.
Examples
>>> df = spark.createDataFrame([('name',)], ['dt']) >>> df.select(collation('dt').alias('collation')).show() +-----------+ | collation| +-----------+ |UTF8_BINARY| +-----------+