Teradata Package for Python Function Reference on VantageCloud Lake | 17.20 - get_values - 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 on VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Package for Python
Release Number
17.20
Publication Date
November 2022
Content Type
Programming Reference
Publication ID
B700-4500-112K
ft:locale
en-US
ft:lastEdition
2024-02-21
ft:sourceId
FTML
dita:id
TeradataPython_FxRef_Lake_1720
Product Category
Teradata Vantage
teradataml.geospatial.geodataframe.GeoDataFrame.get_values = get_values(self, num_rows=99999)
DESCRIPTION:
    Retrieves all values (only) present in a teradataml GeoDataFrame.
    Values are retrieved as per a numpy.ndarray representation of a teradataml GeoDataFrame.
    This format is equivalent to the get_values() representation of a Pandas GeoDataFrame.
 
PARAMETERS:
    num_rows:
        Optional Argument.
        Specifies the number of rows to retrieve values for from a teradataml GeoDataFrame.
        The num_rows parameter specified needs to be an integer value.
        Default Value: 99999
        Types: int
 
RETURNS:
    Numpy.ndarray representation of a teradataml GeoDataFrame
 
RAISES:
    TeradataMlException
 
EXAMPLES:
    >>> load_example_data("geodataframe","sample_streets")
    >>> df1 = GeoDataFrame.from_table('sample_streets')
    >>> df1
          street_name              street_shape
    skey
    1      Coast Blvd  LINESTRING (12 12,18 17)
    1     Main Street  LINESTRING (2 2,3 2,4 1)
    >>>
    # Retrieve all values from the teradataml GeoDataFrame
    >>> vals = df1.get_values()
    >>> vals
    array([['Main Street', 'LINESTRING (2 2,3 2,4 1)'],
           ['Coast Blvd', 'LINESTRING (12 12,18 17)']], dtype=object)
    >>>
    # Retrieve values for a given number of rows from the teradataml GeoDataFrame
    >>> vals = df1.get_values(num_rows = 1)
    >>> vals
    array([['Coast Blvd', 'LINESTRING (12 12,18 17)']], dtype=object)
    >>>