Notitie
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen u aan te melden of de directory te wijzigen.
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen de mappen te wijzigen.
Retourneert het aantal bits dat in het argument expr is ingesteld als een niet-ondertekend 64-bits geheel getal of NULL als het argument NULL is.
Voor de overeenkomstige Databricks SQL-functie, zie de bit_count functie.
Syntaxis
from pyspark.databricks.sql import functions as dbf
dbf.bit_count(col=<col>)
Parameterwaarden
| Kenmerk | Typologie | Description |
|---|---|---|
col |
pyspark.sql.Column of str |
doelkolom waarop moet worden berekend. |
Retouren
pyspark.sql.Column or NULL if the argument is NULL.: het aantal bits dat in het argument expr is ingesteld als een niet-ondertekend 64-bits geheel getal,
Voorbeelden
from pyspark.databricks.sql import functions as dbf
spark.sql("SELECT * FROM VALUES (0), (1), (2), (3), (NULL) AS TAB(value)").select("*", dbf.bit_count("value")).show()