Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Returns true if all values of col are true.
Syntax
from pyspark.sql import functions as sf
sf.every(col)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or column name |
Column to check if all values are true. |
Returns
pyspark.sql.Column: true if all values of col are true, false otherwise.
Examples
import pyspark.sql.functions as sf
spark.createDataFrame(
[[True], [True], [True]], ["flag"]
).select(sf.every("flag")).show()
+-----------+
|every(flag)|
+-----------+
| true|
+-----------+
import pyspark.sql.functions as sf
spark.createDataFrame(
[[True], [False], [True]], ["flag"]
).select(sf.every("flag")).show()
+-----------+
|every(flag)|
+-----------+
| false|
+-----------+