Teradata Package for Python Function Reference on VantageCloud Lake - apply - 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.store.feature_store.models.FeatureGroup.apply = apply(self, object)
DESCRIPTION:
    Register objects to FeatureGroup.
 
PARAMETERS:
    object:
        Required Argument.
        Specifies the object to update the FeatureGroup.
        Types: Feature OR DataSource OR Entity.
 
RETURNS:
    bool.
 
RAISES:
    TeradataMLException
 
EXAMPLES:
    >>> load_example_data('dataframe', ['sales'])
    >>> df = DataFrame("sales")
    >>> # Create FeatureGroup to use it in examples.
    >>> from teradataml import Feature, Entity, DataSource, FeatureGroup
    >>> feature = Feature('sales:Feb', df.Feb)
    >>> entity = Entity('sales:accounts', df.accounts)
    >>> data_source = DataSource('Sales_Data', df)
    >>> fg = FeatureGroup('Sales',
    ...                   features=feature,
    ...                   entity=entity,
    ...                   data_source=data_source)
 
    # Example 1: create a new Feature for column df.Mar and
    #            apply the feature to FeatueGroup.
    >>> # Create Feature.
    >>> feature = Feature('sales:Mar', df.Mar)
    >>> # Register the above Feature with FeatureGroup.
    >>> fg.apply(feature)
    True
    >>>