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

> Return the geometry at index n (0-th based) of a multi-geometry column.

Return the geometry at index n (0-th based) of a multi-geometry column.

SQL reference: [`ST_GeometryN`](/reference/wherobots-db/geometry-data/accessors/ST_GeometryN)

## Signature

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

ST_GeometryN(multi_geometry: ColumnOrName, n: Union[ColumnOrName, int]) -> Column
```

## Parameters

<ParamField path="multi_geometry" type="ColumnOrName" required>
  Multi-geometry column to get from.
</ParamField>

<ParamField path="n" type="Union[ColumnOrName, int]" required>
  Index to select, given as an integer or integer column, 0-th based index, returns null if index is greater than maximum index.
</ParamField>

## Returns

<ResponseField name="return" type="Column">
  Geometry located at index n in multi\_geometry as a geometry column.
</ResponseField>

## Raises

* `ValueError`: If


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