Nota
L-aċċess għal din il-paġna jeħtieġ l-awtorizzazzjoni. Tista’ tipprova tidħol jew tibdel id-direttorji.
L-aċċess għal din il-paġna jeħtieġ l-awtorizzazzjoni. Tista’ tipprova tibdel id-direttorji.
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()