> ## 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_WeightedDistanceBandColumn (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 be distance^alpha.

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

## Signature

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

ST_WeightedDistanceBandColumn(
    geometry: ColumnOrName,
    threshold: ColumnOrName,
    alpha: Union[ColumnOrName, float],
    include_zero_distance_neighbors: Union[ColumnOrName, bool] = True,
    include_self: Union[ColumnOrName, bool] = False,
    self_weight: Union[ColumnOrName, float] = 1.0,
    use_spheroid: Union[ColumnOrName, bool] = False,
    attributes: ColumnOrName = None,
) -> Column
```

## Parameters

<ParamField path="geometry" type="ColumnOrName" required>
  name of the geometry column
</ParamField>

<ParamField path="threshold" type="ColumnOrName" required>
  Distance threshold for considering neighbors
</ParamField>

<ParamField path="alpha" type="Union[ColumnOrName, float]" required>
  alpha to use for inverse distance weights. Computation is dist^alpha. Default is -1.0
</ParamField>

<ParamField path="include_zero_distance_neighbors" type="Union[ColumnOrName, bool]" default="True">
  whether to include neighbors that are 0 distance. If 0 distance neighbors are
  included, values are infinity as per the floating point spec (divide by 0)
</ParamField>

<ParamField path="include_self" type="Union[ColumnOrName, bool]" default="False">
  whether to include self in the list of neighbors
</ParamField>

<ParamField path="self_weight" type="Union[ColumnOrName, float]" default="1.0">
  the value to use for the self weight. Default is 1.0
</ParamField>

<ParamField path="use_spheroid" type="Union[ColumnOrName, bool]" default="False">
  whether to use a cartesian or spheroidal distance calculation. Default is false
</ParamField>

<ParamField path="attributes" type="ColumnOrName" default="None">
  the attributes to save in the neighbor column.
</ParamField>


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