Teradata Python Package Import - Teradata VantageCloud Lake

Lake - Analyze Your Data with ClearScape Analytics™

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2026-02-20
dita:mapPath
tcl1683670667798.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
tcl1683670667798

Importing Teradata Package for Python modules using wildcard '*' or specific modules can lead to namespace collisions which overwrites the variable names used.

Example:

>>> import pandas as pd
>>> data = pd.read_csv(r"./sample.csv")
>>> print(type(data))
 
<class 'pandas.core.frame.DataFrame'>
 
 
>>> from teradataml import *
>>> print(type(data))
 
<class 'module'>

'data' is one of the module names in Teradata Package for Python and local variable 'data' which holds csv data is replaced by the module object.

To avoid the overwriting issue:
  • Avoid wildcard imports: Instead of using 'from package import *', explicitly import only the necessary components. For example:
    >>> from teradataml  import specific_module
  • Use aliases: If you need to import a module with a common name, use an alias to avoid conflicts. For example:
    >>> import teradataml.data as td_data