Teradata Package for Python Function Reference | 20.00 - from_DataFrame - 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 - 20.00
- Deployment
- VantageCloud
- VantageCore
- Edition
- VMware
- Enterprise
- IntelliFlex
- Product
- Teradata Package for Python
- Release Number
- 20.00.00.11
- Published
- August 2026
- ft:locale
- en-US
- ft:lastEdition
- 2026-08-13
- dita:id
- TeradataPython_FxRef_Enterprise_2000
- Product Category
- Teradata Vantage
- teradataml.store.feature_store.models.FeatureGroup.from_DataFrame = from_DataFrame(name, entity_columns, df, timestamp_column=None) method of builtins.type instance
- DESCRIPTION:
Method to create FeatureGroup from DataFrame.
PARAMETERS:
name:
Required Argument.
Specifies the name of the FeatureGroup.
Note:
* Entitiy, DataSource also get the same name as "name".
User's can change the name of Entity or DataSource by accessing
object from FeatureGroup.
Types: str.
entity_columns:
Required Argument.
Specifies the column names for the Entity.
Types: str or list of str.
df:
Required Argument.
Specifies teradataml DataFrame for creating DataSource.
Types: teradataml DataFrame.
timestamp_column:
Optional Argument.
Specifies the name of the column in the Query which
holds the record creation time.
Types: str OR teradataml DataFrame column
RETURNS:
FeatureGroup
RAISES:
None
EXAMPLES:
>>> load_example_data('dataframe', ['sales'])
>>> df = DataFrame("sales")
# Example 1: create a FeatureGroup from DataFrame created on 'sales' table and
# consider 'accounts' column as entity and 'datetime' column
# as timestamp_column.
>>> from teradataml import FeatureGroup
>>> df = DataFrame("sales")
>>> fg = FeatureGroup.from_DataFrame(
... name='sales',
... entity_columns='accounts',
... df=df,
... timestamp_column='datetime'
... )
>>> fg
FeatureGroup(sales, features=[Feature(name=Feb), Feature(name=Jan), Feature(name=Mar), Feature(name=Apr)], entity=Entity(name=sales), data_source=DataSource(name=sales))
# Example 2: create a FeatureGroup from DataFrame created on 'sales' table and
# consider 'accounts' and 'jan' columns as entity and 'datetime' column
# as timestamp_column. Here, timestamp_column is specified
# as ColumnExpression.
>>> from teradataml import FeatureGroup, ColumnExpression
>>> fg = FeatureGroup.from_DataFrame(
... name='sales',
... entity_columns=['accounts', 'jan'],
... df=df,
... timestamp_column=df.datetime
... )
>>> fg
FeatureGroup(sales, features=[Feature(name=Feb), Feature(name=Jan), Feature(name=Mar), Feature(name=Apr)], entity=Entity(name=sales), data_source=DataSource(name=sales))