メインコンテンツまでスキップ

h3_tochildren

指定された解像度で入力 H3 セル ID の子H3 セル IDを返します。Spark Connect をサポートします。

対応する Databricks SQL 関数については、 h3_tochildren関数を参照してください。

構文

Python
from pyspark.databricks.sql import functions as dbf

dbf.h3_tochildren(col1=<col1>, col2=<col2>)

パラメーター

パラメーター

Type

説明

col1

pyspark.sql.Column または str

H3 セル ID (BIGINT または文字列として表されます)。

col2

pyspark.sql.Columnstr 、または int

返される子 H3 セル ID の解像度。最初の引数の解像度以上、16 未満である必要があります。

Python
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([(599686042433355775, 6,)], ['h3l', 'res'])
df.select(dbf.h3_tochildren('h3l', 'res').alias('result')).collect()
Output
[Row(result=[604189641121202175, 604189641255419903, 604189641389637631, 604189641523855359,     604189641658073087, 604189641792290815, 604189641926508543])]
Python
df.select(dbf.h3_tochildren('h3l', 6).alias('result')).collect()
Output
[Row(result=[604189641121202175, 604189641255419903, 604189641389637631, 604189641523855359,     604189641658073087, 604189641792290815, 604189641926508543])]