Teradata Package for Python Function Reference | 20.00 - head - 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
Published
March 2024
Language
English (United States)
Last Update
2024-04-10
dita:id
TeradataPython_FxRef_Enterprise_2000
Product Category
Teradata Vantage
teradataml.geospatial.geodataframe.GeoDataFrame.head = head(self, n=10)
DESCRIPTION:
    Print the first n rows of the sorted teradataml GeoDataFrame.
    Note:
        The GeoDataFrame is sorted on the index column or the first column if
        there is no index column. The column type must support sorting.
        Unsupported types: ['BLOB', 'CLOB', 'ARRAY', 'VARRAY']
 
PARAMETERS:
    n:
        Optional Argument.
        Specifies the number of rows to select.
        Default Value: 10.
        Types: int
 
RETURNS:
    teradataml GeoDataFrame
 
RAISES:
    TeradataMlException
 
EXAMPLES:
    >>> load_example_data("geodataframe", "sample_shapes")
    >>> df = GeoDataFrame("sample_shapes").select(["skey", "points"])
    >>> df
    skey                                                    points
    1003                                                  POINT (235.52 54.546)
    1010  MULTIPOINT (10.345 20.32 30.6,40.234 50.23 60.24,70.234 80.56 80.234)
    1008       MULTIPOINT (1.65 1.76,1.23 3.76,6.23 3.78,10.76 5.9,20.32 1.231)
    1006                                           POINT (235.52 54.546 7.4564)
    1007                                     MULTIPOINT (1 1,1 3,6 3,10 5,20 1)
    1005                                                          POINT (1 3 5)
    1009                                MULTIPOINT (10 20 30,40 50 60,70 80 80)
    1001                                                          POINT (10 20)
    1002                                                            POINT (1 3)
    1004                                                       POINT (10 20 30)
 
    >>> df.head()
    skey                                                    points
    1003                                                  POINT (235.52 54.546)
    1005                                                          POINT (1 3 5)
    1006                                           POINT (235.52 54.546 7.4564)
    1007                                     MULTIPOINT (1 1,1 3,6 3,10 5,20 1)
    1009                                MULTIPOINT (10 20 30,40 50 60,70 80 80)
    1010  MULTIPOINT (10.345 20.32 30.6,40.234 50.23 60.24,70.234 80.56 80.234)
    1008       MULTIPOINT (1.65 1.76,1.23 3.76,6.23 3.78,10.76 5.9,20.32 1.231)
    1004                                                       POINT (10 20 30)
    1002                                                            POINT (1 3)
    1001                                                          POINT (10 20)
 
    >>> df.head(5)
    skey        points
    1003  POINT (235.52 54.546)
    1005          POINT (1 3 5)
    1004       POINT (10 20 30)
    1002            POINT (1 3)
    1001          POINT (10 20)