Teradata Package for Python Function Reference | 17.10 - tail - 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.tail = tail(self, n=10)
- DESCRIPTION:
Print the last 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.tail()
skey points
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)
1005 POINT (1 3 5)
1004 POINT (10 20 30)
1002 POINT (1 3)
1001 POINT (10 20)
1003 POINT (235.52 54.546)
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)
>>> df.tail(5)
skey points
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)
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)
>>>