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
Enterprise
IntelliFlex
VMware
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_Enterprise_2000
lifecycle
latest
Product Category
Teradata Vantage
teradataml.store.feature_store.models.FeatureGroup.from_DataFrame = from_DataFrame(name, entity_columns, df, timestamp_col_name=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_col_name:
        Optional Argument.
        Specifies the name of the column in the Query which
        holds the record creation time.
        Types: str
 
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_col_name.
    >>> from teradataml import FeatureGroup
    >>> df = DataFrame("sales")
    >>> fg = FeatureGroup.from_DataFrame(
    ...             name='sales',
    ...             entity_columns='accounts',
    ...             df=df,
    ...             timestamp_col_name='datetime'
    ...         )