pyspark.sql.functions.bit_length¶
-
pyspark.sql.functions.
bit_length
(col: ColumnOrName) → pyspark.sql.column.Column¶ Calculates the bit length for the specified string column.
Examples
>>> from pyspark.sql.functions import bit_length >>> spark.createDataFrame([('cat',), ( '🐈',)], ['cat']) \ ... .select(bit_length('cat')).collect() [Row(bit_length(cat)=24), Row(bit_length(cat)=32)]