Notiz
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Iech unzemellen oder Verzeechnesser ze änneren.
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Verzeechnesser ze änneren.
The length of character data includes the trailing spaces. The length of binary data includes binary zeros.
For the corresponding Databricks SQL function, see length function.
Syntax
from pyspark.sql import functions as dbf
dbf.length(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
target column to work on. |
Returns
pyspark.sql.Column: length of the value.
Examples
from pyspark.sql import functions as dbf
spark.createDataFrame([('ABC ',)], ['a']).select('*', dbf.length('a')).show()