Teradata Package for Python Function Reference - translate - 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

Product
Teradata Package for Python
Release Number
17.00
Published
November 2021
Language
English (United States)
Last Update
2021-11-19
lifecycle
previous
Product Category
Teradata Vantage
teradataml.dataframe.sql_functions.translate = translate(x, source='UNICODE', target='LATIN')
Returns a TRANSLATE(x USING source_TO_target) expression
 
PARAMETERS:
  x: A ColumnExpression instance coming from the DataFrame
     or output of other functions in sql_functions. A python
     string literal may also be used.
 
  source, target: str with values:
    - 'UNICODE'
    - 'LATIN'
 
REFERENCES:
  Chapter 28: String Operators and Functions
  Teradata® Database SQL Functions, Operators, Expressions, and
  Predicates, Release 16.20
 
EXAMPLES:
  >>> from teradataml.dataframe.sql_functions import translate
 
  >>> df = DataFrame('df')
  >>> tvshow = df['tvshow']
 
  >>> res = df.assign(tvshow = translate(tvshow))