Teradata Package for Python Function Reference on VantageCloud Lake - isinf - 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
- 20.00.00.03
- Published
- December 2024
- ft:locale
- en-US
- ft:lastEdition
- 2024-12-19
- dita:id
- TeradataPython_FxRef_Lake_2000
- Product Category
- Teradata Vantage
- teradataml.dataframe.sql.DataFrameColumn.isinf = isinf(self)
- DESCRIPTION:
Function evaluates a variable or expression to determine if the
floating-point argument is an infinite number. This function determines
if a database table contains positive or negative infinite values.
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 infinity values or not.
>>> inf_df = df.assign(infornot = df.fare.isinf())
>>> print(inf_df)
age fare infornot
passenger
326 36.0 135.6333 0
183 9.0 31.3875 0
652 18.0 23.0000 0
40 14.0 11.2417 0
774 NaN 7.2250 0
366 30.0 7.2500 0
509 28.0 22.5250 0
795 25.0 7.8958 0
61 22.0 7.2292 0
469 NaN 7.7250 0
>>>