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

> Generate a substring of a linestring geometry column.

Generate a substring of a linestring geometry column.

SQL reference: [`ST_LineSubstring`](/reference/wherobots-db/geometry-data/linear-referencing/ST_LineSubstring)

## Signature

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

ST_LineSubstring(
    line_string: ColumnOrName,
    start_fraction: ColumnOrNameOrNumber,
    end_fraction: ColumnOrNameOrNumber,
) -> Column
```

## Parameters

<ParamField path="line_string" type="ColumnOrName" required>
  Linestring geometry column to generate from.
</ParamField>

<ParamField path="start_fraction" type="ColumnOrNameOrNumber" required>
  Fraction of linestring to start from for the resulting substring as either a number or numeric column.
</ParamField>

<ParamField path="end_fraction" type="ColumnOrNameOrNumber" required>
  Fraction of linestring to end at for the resulting substring as either a number or numeric column.
</ParamField>

## Returns

<ResponseField name="return" type="Column">
  Smaller linestring that runs from start\_fraction to end\_fraction of line\_string as a linestring geometry column, will be null if either start\_fraction or end\_fraction are outside the interval \[0, 1].
</ResponseField>


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