> ## 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_S2ToGeom (Python)

> Create a polygon from the S2 cells

Create a polygon from the S2 cells

SQL reference: [`ST_S2ToGeom`](/reference/wherobots-db/geometry-data/spatial-indexing/ST_S2ToGeom)

## Signature

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

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

## Parameters

<ParamField path="cells" type="Union[ColumnOrName, list]" required>
  S2 cells
</ParamField>

## Returns

<ResponseField name="return" type="Geometry">
  the Polygon for all S2 cells
</ResponseField>


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