Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
from pyspark.databricks.sql import functions as dbf
dbf.h3_minchild(col1=<col1>, col2=<col2>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col1 |
pyspark.sql.Column or str |
An H3 cell ID, represented as an int or a str |
col2 |
pyspark.sql.Column, str, or int |
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
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()
[Row(result=622204039496499199)]
df.select(dbf.h3_minchild('h3l', 10).alias('result')).collect()
[Row(result=622204039496499199)]