snowflake.snowpark.functions.st_ymin

snowflake.snowpark.functions.st_ymin(geography_or_geometry_expression)[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.41.0/src/snowflake/snowpark/_functions/scalar_functions.py#L3597-L3620)

Returns the minimum Y coordinate (latitude) of all points in a GEOGRAPHY or GEOMETRY object.

Parameters:

geography_or_geometry_expression (ColumnOrName) – A GEOGRAPHY or GEOMETRY object.

Returns:

The minimum Y coordinate value.

Return type:

Column

Examples::
>>> from snowflake.snowpark.functions import to_geography
>>> df = session.create_dataframe([
...     ['POINT(-180 0)'],
...     ['POINT(180 0)'],
...     ['LINESTRING(-60 30, 60 30)'],
...     ['LINESTRING(-60 -30, 60 -30)']
... ], schema=["geometry"])
>>> df.select(st_ymin(to_geography(df["geometry"])).alias("ymin")).collect()
[Row(YMIN=0.0), Row(YMIN=0.0), Row(YMIN=29.999999999999943), Row(YMIN=-49.106605350869174)]
Copy
语言: 中文