הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
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()