Catatan
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba masuk atau mengubah direktori.
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba mengubah direktori.
Memampatkan set input ID sel H3 sebaik mungkin. Mendukung Spark Connect.
Untuk fungsi Databricks SQL yang sesuai, lihat h3_compact fungsi.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.h3_compact(col=<col>)
Parameter-parameternya
| Pengaturan | Tipe | Description |
|---|---|---|
col |
pyspark.sql.Column atau str |
Array ID sel H3, direpresentasikan sebagai Kolom atau string untuk dikompresi. |
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([([599686042433355775, 599686030622195711, 599686044580839423,
... 599686038138388479, 599686043507097599, 599686015589810175, 599686014516068351,
... 599686034917163007, 599686029548453887, 599686032769679359, 599686198125920255,
... 599686040285872127, 599686041359613951, 599686039212130303, 599686023106002943,
... 599686027400970239, 599686013442326527, 599686012368584703, 599686018811035647],)],
... ['h3l_array'])
df.select(dbf.h3_compact('h3l_array').alias('result')).collect()
[Row(result=[599686030622195711, 599686015589810175, 599686014516068351, 599686034917163007, 599686029548453887, 599686032769679359, 599686198125920255, 599686023106002943, 599686027400970239, 599686013442326527, 599686012368584703, 599686018811035647, 595182446027210751])]