Teradata Package for Python Function Reference | 20.00 - set_link - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.

Teradata® Package for Python Function Reference - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00.00.03
Published
December 2024
ft:locale
en-US
ft:lastEdition
2024-12-19
dita:id
TeradataPython_FxRef_Enterprise_2000
Product Category
Teradata Vantage
teradataml.geospatial.geodataframecolumn.GeoDataFrameColumn.set_link = set_link(self, index, link_id)
DESCRIPTION:
    Set the link ID of a specified point in a GeoSequence.
 
PARAMETERS:
    index:
        Required Argument.
        Specifies the index of the point in the GeoSequence, where the index of the
        first point is 1.
        Types: int, str, ColumnExpression
 
    link_id:
        Required Argument.
        Specifies the new link ID of the specified point in the GeoSequence. The data type
        of linkID is DECIMAL(18,0).
        Types: float
 
SUPPORTED GEOMETRY TYPES:
    GeoSequence
 
RAISES:
    TypeError, ValueError, TeradataMlException
 
RETURNS:
    GeoDataFrameColumn
 
EXAMPLES:
    from teradataml import GeoDataFrame, load_example_data
    from teradataml import Point, LineString, Polygon, GeometryCollection
    # Load example data.
    load_example_data("geodataframe", "sample_shapes")
    # Create a GeoDataFrame.
    geodf = GeoDataFrame("sample_shapes")
    print(geodf)
 
    # Example 1: Set the link ID for the point at the 1st index in geometries in column 'geosequence'.
    # Let's select only few columns from GeoDataFrame.
    geoseq = geodf.select(["skey", "geosequence"])[geodf.skey.isin([1001, 1002])]
    geoseq.assign(res = geoseq.geosequence.set_link(index=1, link_id=20.2))