Skip to content
πŸŽ‰ Apache Sedona 1.9.1 is out now! πŸ—ΊοΈ Geography SQL functions, Box2D & Box3D types, raster Python UDFs & more. Read the release notes β†’

Python API reference

The Python API reference documents Sedona's Python modules, classes, and functions, including their parameters and return types.

For functions used with PySpark DataFrames, see the SQL function reference. For example, ST_Length calculates the length of a linestring geometry:

from sedona.spark.sql.st_functions import ST_Length

df.select(ST_Length("geometry").alias("length"))

This example assumes a DataFrame named df with a geometry column named geometry and a Spark session configured with Sedona. See the Python installation guide for setup instructions and the DataFrame API guide for argument conventions and more examples.