Σημείωση
Η πρόσβαση σε αυτή τη σελίδα απαιτεί εξουσιοδότηση. Μπορείτε να δοκιμάσετε να συνδεθείτε ή να αλλάξετε καταλόγους.
Η πρόσβαση σε αυτή τη σελίδα απαιτεί εξουσιοδότηση. Μπορείτε να δοκιμάσετε να αλλάξετε καταλόγους.
Calculates the bit length for the specified string column.
For the corresponding Databricks SQL function, see bit_length function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.bit_length(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
Source column or strings |
Returns
pyspark.sql.Column: Bit length of the col
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('cat',), ( '\U0001F408',)], ['cat'])
df.select('*', dbf.bit_length('cat')).show()