Skip to main content

h3_isvalid

Returns True if the input represents a valid H3 cell ID. Supports Spark Connect.

For the corresponding Databricks SQL function, see h3_isvalid function.

Syntax

Python
from pyspark.databricks.sql import functions as dbf

dbf.h3_isvalid(col=<col>)

Parameters

Parameter

Type

Description

col

pyspark.sql.Column or str

An int or str

Examples

Python
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([(599686042433355775,)], ['h3l'])
df.select(dbf.h3_isvalid('h3l').alias('result')).collect()
Output
[Row(result=True)]