Teradata Package for Python Function Reference on VantageCloud Lake - get_entity - 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.feature_store.FeatureStore.get_entity = get_entity(self, name)
- DESCRIPTION:
Get the entity from feature store.
PARAMETERS:
name:
Required Argument.
Specifies the name of the entity.
Types: str
RETURNS:
Object of Entity.
RAISES:
None
EXAMPLES:
>>> from teradataml import DataFrame, Entity, FeatureStore, load_example_data
# Load the admissions data to Vantage.
>>> load_example_data("dataframe", "admissions_train")
# Create DataFrame on admissions data.
>>> df = DataFrame("admissions_train")
>>> df
masters gpa stats programming admitted
id
34 yes 3.85 Advanced Beginner 0
32 yes 3.46 Advanced Beginner 0
11 no 3.13 Advanced Advanced 1
40 yes 3.95 Novice Beginner 0
38 yes 2.65 Advanced Beginner 1
36 no 3.00 Advanced Novice 0
7 yes 2.33 Novice Novice 1
26 yes 3.57 Advanced Advanced 1
19 yes 1.98 Advanced Advanced 0
13 no 4.00 Advanced Novice 1
>>>
# Create Entity for column 'id' with name 'admissions_id'.
>>> entity = Entity(name='admissions_id', description="Entity for admissions", columns=df.id)
# Apply the Entity to FeatureStore 'vfs_v1'.
>>> fs = FeatureStore('vfs_v1')
>>> fs.apply(entity)
True
>>>
# Get the Entity 'admissions_id' from repo 'vfs_v1'
>>> entity = fs.get_entity('admissions_id')
>>> entity
Entity(name=admissions_id)
>>>