h3_ischildof
Returns True if the first H3 cell ID is a child of the second H3 cell ID. Supports Spark Connect.
For the corresponding Databricks SQL function, see h3_ischildof function.
Syntax
Python
from pyspark.databricks.sql import functions as dbf
dbf.h3_ischildof(col1=<col1>, col2=<col2>)
Parameters
Parameter | Type | Description |
|---|---|---|
|
| An H3 cell ID, represented as a Column or string. |
|
| An H3 cell ID, represented as a Column or string. |
Examples
Python
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([(608693241318998015, 599686042433355775,),], ['h3l1', 'h3l2'])
df.select(dbf.h3_ischildof('h3l1', 'h3l2').alias('result')).collect()
Output
[Row(result=True)]