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

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00
Published
March 2024
Language
English (United States)
Last Update
2024-04-10
dita:id
TeradataPython_FxRef_Enterprise_2000
Product Category
Teradata Vantage
teradataml.dataframe.sql.DataFrameColumn.__gt__ = __gt__(self, other)
Compare the ColumnExpressions to check if one ColumnExpression
has values greater than the other or not.
 
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:
    >>> load_example_data("dataframe", "admissions_train")
    >>> df = DataFrame("admissions_train")
    >>> df
       masters   gpa     stats programming  admitted
    id
    15     yes  4.00  Advanced    Advanced         1
    40     yes  3.95    Novice    Beginner         0
    7      yes  2.33    Novice      Novice         1
    22     yes  3.46    Novice    Beginner         0
    38     yes  2.65  Advanced    Beginner         1
    26     yes  3.57  Advanced    Advanced         1
    5       no  3.44    Novice      Novice         0
    24      no  1.87  Advanced      Novice         1
    39     yes  3.75  Advanced    Beginner         0
    30     yes  3.79  Advanced      Novice         0
 
    # Example 1: Get all the students with gpa greater than 3.
    >>> df[df.gpa > 3]
       masters   gpa     stats programming  admitted
    id
    14     yes  3.45  Advanced    Advanced         0
    26     yes  3.57  Advanced    Advanced         1
    5       no  3.44    Novice      Novice         0
    3       no  3.70    Novice    Beginner         1
    40     yes  3.95    Novice    Beginner         0
    22     yes  3.46    Novice    Beginner         0
    39     yes  3.75  Advanced    Beginner         0
    37      no  3.52    Novice      Novice         1
    1      yes  3.95  Beginner    Beginner         0
    31     yes  3.50  Advanced    Beginner         1
 
    >>> load_example_data("burst", "finance_data")
    >>> df = DataFrame("finance_data")
    >>> df
       start_time_column end_time_column  expenditure  income  investment
    id
    1           67/06/30        07/07/10        415.0   451.0       180.0
    4           67/06/30        07/07/10        448.0   493.0       192.0
    2           67/06/30        07/07/10        421.0   465.0       179.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
 
    # Example 2: Get all rows with expenditure greater than 400 and investment
    #            greater than 170.
    >>> df[(df.expenditure > 400) & (df.investment > 170)]
       start_time_column end_time_column  expenditure  income  investment
    id
    1           67/06/30        07/07/10        415.0   451.0       180.0
    4           67/06/30        07/07/10        448.0   493.0       192.0
    2           67/06/30        07/07/10        421.0   465.0       179.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