Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
Important
This feature is in Public Preview.
Returns the Y coordinate of the input point geometry, or None if the input point geometry is empty.
For the corresponding Databricks SQL function, see st_y function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.st_y(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
A Geometry value. |
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('POINT(1 2)',)], ['wkt'])
df.select(dbf.st_y(dbf.st_geomfromtext('wkt')).alias('result')).collect()
[Row(result=2.0)]
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('POINT ZM (1 2 3 4)',)], ['wkt'])
df.select(dbf.st_y(dbf.st_geomfromtext('wkt')).alias('result')).collect()
[Row(result=2.0)]