---
title: h3_stringtoh3
description: "h3\\_stringtoh3 function in PySpark: Converts the string representation H3 cell ID to its big integer representation."
canonical_url: https://docs.databricks.com/gcp/en/pyspark/reference/functions/h3_stringtoh3
---

# h3\_stringtoh3

Converts the string representation [H3 cell ID](https://h3geo.org/docs/library/index/cell) to its big integer representation. Supports Spark Connect.

For the corresponding Databricks SQL function, see [`h3_stringtoh3` function](https://docs.databricks.com/gcp/en/sql/language-manual/functions/h3_stringtoh3.md).

## Syntax

```python
from pyspark.databricks.sql import functions as dbf

dbf.h3_stringtoh3(col=<col>)
```

## Parameters

| Parameter | Type                          | Description                            |
| --------- | ----------------------------- | -------------------------------------- |
| `col`     | `pyspark.sql.Column` or `str` | An H3 cell ID represented as a string. |

## Examples

```python
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('85283473fffffff',)], ['h3s'])
df.select(dbf.h3_stringtoh3('h3s').alias('result')).collect()
```

```Output
[Row(result=599686042433355775)]
```
