Teradata Package for Python Function Reference on VantageCloud Lake - __add__ - 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.11
Publication Date
August 2026
Content Type
Programming Reference
Publication ID
B700-4500-200K
ft:locale
en-US
ft:lastEdition
2026-08-13
ft:sourceId
FTML
dita:id
TeradataPython_FxRef_Lake_2000
Product Category
Teradata Vantage
teradataml.store.feature_store.models.FeatureGroup.__add__ = __add__(self, other)
Combines two Feature groups.
 
PARAMETERS:
    other :
        Required Argument.
        Specifies another FeatureGroup.
        Types: FeatureGroup
 
RETURNS:
    FeatureGroup
 
RAISES:
    TypeError, ValueError
 
EXAMPLES:
    >>> load_example_data("dataframe", "sales")
    >>> df = DataFrame("sales")
    >>> df
                  Feb    Jan    Mar    Apr    datetime
    accounts
    Alpha Co    210.0  200.0  215.0  250.0  04/01/2017
    Blue Inc     90.0   50.0   95.0  101.0  04/01/2017
    Jones LLC   200.0  150.0  140.0  180.0  04/01/2017
    Orange Inc  210.0    NaN    NaN  250.0  04/01/2017
    Yellow Inc   90.0    NaN    NaN    NaN  04/01/2017
    Red Inc     200.0  150.0  140.0    NaN  04/01/2017
 
    # Example 1: Create two feature groups and then create a new feature
    #            group by combining those two feature groups.
    # Creating first feature group.
    >>> f1 = Feature("sales_Jan", column=df.Jan)
    >>> f2 = Feature("sales_Feb", column=df.Feb)
    >>> entity = Entity(name="sales", columns='accounts')
    >>> data_source = DataSource("sales", source=df.show_query())
    >>> fg1 = FeatureGroup(name="sales_jan_feb", entity=entity, features=[f1, f2], data_source=data_source)
    >>> fg1
    FeatureGroup(sales_jan_feb, features=[Feature(name=sales_Jan), Feature(name=sales_Feb)], entity=Entity(name=sales), data_source=DataSource(name=sales))
 
    # Creating second feature group.
    >>> f3 = Feature("sales_Mar", column=df.Mar)
    >>> f4 = Feature("sales_Apr", column=df.Apr)
    >>> data_source = DataSource("sales_Mar_Apr", source=df.show_query())
    >>> fg2 = FeatureGroup(name="sales_Mar_Apr", entity=entity, features=[f3, f4], data_source=data_source)
    >>> fg2
    FeatureGroup(sales_Mar_Apr, features=[Feature(name=sales_Mar), Feature(name=sales_Apr)], entity=Entity(name=sales), data_source=DataSource(name=sales))
 
    # Combining two feature groups.
    >>> new_fg = feature_group1 + feature_group2
    >>> new_fg
    FeatureGroup(sales_jan_feb_sales_Mar_Apr, features=[Feature(name=sales_Jan), Feature(name=sales_Feb), Feature(name=sales_Mar), Feature(name=sales_Apr)], entity=Entity(name=sales), data_source=DataSource(name=sales))
    >>>