> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ST_H3Compact (Python)

> Compact H3 cells by recursively replacing complete child sets with their parents.

Compact H3 cells by recursively replacing complete child sets with their parents.

SQL reference: [`ST_H3Compact`](https://docs.wherobots.com/reference/wherobots-db/geometry-data/spatial-indexing/ST_H3Compact)

## Signature

```python theme={"system"}
from sedona.spark.sql.st_functions import ST_H3Compact

ST_H3Compact(cells: Union[ColumnOrName, list]) -> Column
```

## Parameters

**cells** `Union[ColumnOrName, list]` *required*

unique H3 cells at the same resolution

## Returns

**return** `List[long]`

compacted H3 cells, which may have different resolutions


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.