Entity Class | Teradata Package for Python - Entity Class - 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

The Entity class represents an entity that groups related features together.

Syntax

Entity(name, columns, description=None)

Required Parameters

name
Specifies unique name of the entity.
columns
Specifies the names of the columns.

Optional Parameter

description
Specifies the human readable description of the entity.

Example setup

>>> load_example_data('dataframe', ['sales'])
>>> df = DataFrame("sales")

Example 1: Create a Entity for above mentioned DataFrame with name 'sales_accounts'

This example creates an entity with column 'accounts' for 'sales' DataFrame and names it 'sales_accounts'.

>>> from teradataml import Entity
>>> entity = Entity('sales_accounts', df.accounts)
>>> entity
Entity(name=sales_accounts)

Example 2: Create a Entity with column name 'accounts'

>>> entity = Entity('sales_accounts', 'accounts')
>>> entity
Entity(name=sales_accounts)

Example 3: Create a Entity with multiple columns

>>> entity = Entity('sales_cols', ['accounts', 'jan'])
>>> entity
Entity(name=sales_cols)