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

> Creates a weights column containing the other records within the threshold and their weight.

Creates a weights column containing the other records within the threshold and their weight.

Weights will always be 1.0.

@param geometry: name of the geometry column
@param threshold: Distance threshold for considering neighbors
@param include\_zero\_distance\_neighbors: whether to include neighbors that are 0 distance.
@param include\_self: whether to include self in the list of neighbors
@param use\_spheroid: whether to use a cartesian or spheroidal distance calculation. Default is false
@param attributes: the attributes to save in the neighbor column.

SQL reference: [`ST_BinaryDistanceBandColumn`](/reference/wherobots-db/geometry-data/spatial-statistics/ST_BinaryDistanceBandColumn)

## Signature

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

ST_BinaryDistanceBandColumn(
    geometry: ColumnOrName,
    threshold: ColumnOrName,
    include_zero_distance_neighbors: Union[ColumnOrName, bool] = True,
    include_self: Union[ColumnOrName, bool] = False,
    use_spheroid: Union[ColumnOrName, bool] = False,
    attributes: ColumnOrName = None,
) -> Column
```

## Parameters

<ParamField path="geometry" type="ColumnOrName" required />

<ParamField path="threshold" type="ColumnOrName" required />

<ParamField path="include_zero_distance_neighbors" type="Union[ColumnOrName, bool]" default="True" />

<ParamField path="include_self" type="Union[ColumnOrName, bool]" default="False" />

<ParamField path="use_spheroid" type="Union[ColumnOrName, bool]" default="False" />

<ParamField path="attributes" type="ColumnOrName" default="None" />


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