Teradata Package for Python Function Reference | 20.00 - isfinite - 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.00.03
Published
December 2024
ft:locale
en-US
ft:lastEdition
2024-12-19
dita:id
TeradataPython_FxRef_Enterprise_2000
lifecycle
latest
Product Category
Teradata Vantage
teradataml.dataframe.sql.DataFrameColumn.isfinite = isfinite(self)
DESCRIPTION:
    Function evaluates a variable or expression to determine if
    it is a finite floating value. A finite floating value is not
    a NaN (Not a Number) value and is not an infinity value.
 
RETURNS:
    ColumnExpression.
 
EXAMPLES:
    # Load the data to run the example.
    >>> load_example_data("teradataml","titanic")
 
    # Create a DataFrame on 'titanic' table.
    >>> titanic = DataFrame.from_table('titanic')
    >>> df = titanic.select(["passenger", "age", "fare"])
    >>> print(df)
                age      fare
    passenger
    326        36.0  135.6333
    183         9.0   31.3875
    652        18.0   23.0000
    40         14.0   11.2417
    774         NaN    7.2250
    366        30.0    7.2500
    509        28.0   22.5250
    795        25.0    7.8958
    61         22.0    7.2292
    469         NaN    7.7250
    >>>
 
    # Example 1: Find whether 'fare' column contains finite values or not.
    >>> finite_df = df.assign(finiteornot = df.fare.isfinite())
    >>> print(finite_df)
                age    fare finiteornot
    passenger
    530        23.0  11.500           1
    591        35.0   7.125           1
    387         1.0  46.900           1
    856        18.0   9.350           1
    244        22.0   7.125           1
    713        48.0  52.000           1
    448        34.0  26.550           1
    122         NaN   8.050           1
    734        23.0  13.000           1
    265         NaN   7.750           1
    >>>