features | FeatureGroup Property | Teradata Package for Python - features - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Package for Python
Release Number
20.00
Published
March 2025
ft:locale
en-US
ft:lastEdition
2025-12-05
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage

Use the features property to get the features from a feature group.

Example setup

>>> from teradataml import DataSource, Entity, Feature, FeatureGroup, load_example_data
>>> load_example_data("dataframe", "sales")

Example: Get the features from a feature group

Create a DataFrame.

>>> df = DataFrame("sales")

Create the features.

>>> jan_feature = Feature("sales:Jan", df.Jan)
>>> feb_feature = Feature("sales:Fan", df.Feb)
>>> mar_feature = Feature("sales:Mar", df.Mar)
>>> apr_feature = Feature("sales:Apr", df.Apr)

Create an entity.

>>> entity = Entity("sales:accounts", df.accounts)

Create a data source.

>>> data_source = DataSource("sales_source", df)

Create a feature group.

>>> fg = FeatureGroup('Sales',
...                   features=[jan_feature, feb_feature, mar_feature, apr_feature],
...                   entity=entity,
...                   data_source=data_source)

Get the features from the feature group.

>>> fg.features
[Feature(name=sales:Jan),
 Feature(name=sales:Feb),
 Feature(name=sales:Mar),
 Feature(name=sales:Apr)]