Teradata Package for Python Function Reference on VantageCloud Lake - last - 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
20.00.00.03
Published
December 2024
ft:locale
en-US
ft:lastEdition
2024-12-19
dita:id
TeradataPython_FxRef_Lake_2000
Product Category
Teradata Vantage
teradataml.dataframe.sql.DataFrameColumn.last = last(self, **kwargs)
DESCRIPTION:
    Function returns newest value, determined by the timecode, for each group
    in a column.
    Note:
        This can only be used as Time Series Aggregate function.
 
PARAMETERS:
    kwargs:
        Specifies optional keyword arguments.
 
RETURNS:
     ColumnExpression
 
RAISES:
    RuntimeError - If column does not support the aggregate operation.
 
EXAMPLES:
    >>> # Load the example datasets.
    ... load_example_data("dataframe", ["ocean_buoys"])
 
    >>> # Create the required DataFrames.
    ... # DataFrame on non-sequenced PTI table
    ... ocean_buoys = DataFrame("ocean_buoys")
 
    >>> ocean_buoys_grpby1 = ocean_buoys.groupby_time(timebucket_duration="2cd",
    ...                                               value_expression="buoyid", fill="NULLS")
 
    >>> ocean_buoys_grpby1.temperature.last()