Teradata Package for Python Function Reference on VantageCloud Lake | 17.20 - __rmul__ - 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
17.20
Publication Date
November 2022
Content Type
Programming Reference
Publication ID
B700-4500-112K
ft:locale
en-US
ft:lastEdition
2024-02-21
ft:sourceId
FTML
dita:id
TeradataPython_FxRef_Lake_1720
Product Category
Teradata Vantage
teradataml.dataframe.sql.DataFrameColumn.__rmul__ = __rmul__(self, other)
Compute the product between two ColumnExpressions using *.
 
PARAMETERS:
    other:
        Required Argument.
        Specifies Python literal or another ColumnExpression.
        Types: ColumnExpression, Python literal
 
RETURNS:
    ColumnExpression
 
RAISES:
    Exception
        A TeradataMlException gets thrown if SQLAlchemy
        throws an exception when evaluating the expression.
 
EXAMPLES:
    # Example 1: Double the income and assign increased
    #            income to new column 'double_income'.
     >>> df.assign(double_income=df.income * 2)
       start_time_column end_time_column  expenditure  income  investment  double_income
    id
    3           67/06/30        07/07/10        434.0   485.0       185.0          970.0
    2           67/06/30        07/07/10        421.0   465.0       179.0          930.0
    1           67/06/30        07/07/10        415.0   451.0       180.0          902.0
    5           67/06/30        07/07/10        459.0   509.0       211.0         1018.0
    4           67/06/30        07/07/10        448.0   493.0       192.0          986.0
 
    # Example 2: Filter out the rows after increasing the income by 10% is greater than 500.
    >>> df[(df.income + df.income * 0.1) > 500]
       start_time_column end_time_column  expenditure  income  investment
    id
    2           67/06/30        07/07/10        421.0   465.0       179.0
    4           67/06/30        07/07/10        448.0   493.0       192.0
    3           67/06/30        07/07/10        434.0   485.0       185.0
    5           67/06/30        07/07/10        459.0   509.0       211.0