Teradata Package for Python Function Reference | 17.10 - 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

Product
Teradata Package for Python
Release Number
17.10
Published
April 2022
Language
English (United States)
Last Update
2022-08-19
lifecycle
previous
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)
    >>>