Teradata Package for Python Function Reference on VantageCloud Lake - __init__ - 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.03
- Published
- December 2024
- ft:locale
- en-US
- ft:lastEdition
- 2024-12-19
- dita:id
- TeradataPython_FxRef_Lake_2000
- Product Category
- Teradata Vantage
- teradataml.store.feature_store.models.Feature.__init__ = __init__(self, name, column, feature_type=<FeatureType.CONTINUOUS: 1>, description=None, tags=None, status=<FeatureStatus.ACTIVE: 1>)
- DESCRIPTION:
Constructor for Feature.
PARAMETERS:
name:
Required Argument.
Specifies the unique name of the Feature.
Types: str.
column:
Required Argument.
Specifies the DataFrame Column.
Types: teradataml DataFrame Column
feature_type:
Optional Argument.
Specifies whether feature is continuous or discrete.
Default Value: FeatureType.CONTINUOUS
Types: FeatureType Enum
description:
Optional Argument.
Specifies human readable description for Feature.
Types: str
tags:
Optional Argument.
Specifies the tags for Feature.
Types: str OR list of str
status:
Optional Argument.
Specifies whether feature is archived or active.
Types: FeatureStatus Enum
RETURNS:
None.
RAISES:
None
EXAMPLES:
>>> from teradataml import DataFrame, Feature, FeatureType, load_example_data
# Load the sales data to Vantage.
>>> load_example_data("dataframe", "sales")
# Create DataFrame on sales data.
>>> df = DataFrame("sales")
>>> df
>>> df
Feb Jan Mar Apr datetime
accounts
Orange Inc 210.0 NaN NaN 250.0 04/01/2017
Jones LLC 200.0 150.0 140.0 180.0 04/01/2017
Blue Inc 90.0 50.0 95.0 101.0 04/01/2017
Alpha Co 210.0 200.0 215.0 250.0 04/01/2017
Yellow Inc 90.0 NaN NaN NaN 04/01/2017
# create a Categorical Feature for column 'Feb' for 'sales' DataFrame and name it as
# 'sales_Feb'.
>>> from teradataml import Feature
>>> feature = Feature('sales_Feb', column=df.Feb, feature_type=FeatureType.CATEGORICAL)
>>> feature
Feature(name=sales_Feb)
>>>