h3_minchild
Returns the child of minimum value of the input H3 cell at the specified resolution. Supports Spark Connect.
For the corresponding Databricks SQL function, see h3_minchild function.
Syntax
Python
from pyspark.databricks.sql import functions as dbf
dbf.h3_minchild(col1=<col1>, col2=<col2>)
Parameters
Parameter | Type | Description |
|---|---|---|
|
| An H3 cell ID, represented as an |
|
| The resolution of the minimum value child cell ID to return. Must be non-negative and larger or equal to the resolution of the first argument. |
Examples
Python
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([(599686042433355775, 10,)], ['h3l', 'res'])
df.select(dbf.h3_minchild('h3l', 'res').alias('result')).collect()
Output
[Row(result=622204039496499199)]
Python
df.select(dbf.h3_minchild('h3l', 10).alias('result')).collect()
Output
[Row(result=622204039496499199)]