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
Publication Date
March 2025
Content Type
User Guide
Publication ID
B700-4006-200K
ft:locale
en-US
ft:lastEdition
2026-08-13
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
ft:sourceId
dita
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)]