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

> Return the index n (0-th based) interior ring of a polygon geometry column.

Return the index n (0-th based) interior ring of a polygon geometry column.

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

## Signature

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

ST_InteriorRingN(polygon: ColumnOrName, n: Union[ColumnOrName, int]) -> Column
```

## Parameters

<ParamField path="polygon" type="ColumnOrName" required>
  Polygon geometry column to get an interior ring from.
</ParamField>

<ParamField path="n" type="Union[ColumnOrName, int]" required>
  Index of interior ring to return as either an integer or integer column, 0-th based.
</ParamField>

## Returns

<ResponseField name="return" type="Column">
  Interior ring at index n as a linestring geometry column or null if n is greater than maximum index
</ResponseField>

## Raises

* `ValueError`: If n is an integer and less than 0.


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