Teradata Package for Python Function Reference | 20.00 - isna - 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
Product Category
Teradata Vantage
teradataml.dataframe.sql.DataFrameColumn.isna = isna(self)
Test for NA values
 
PARAMETERS:
    None
 
RETURNS:
    When used with assign() function, newly assigned column contains
    A boolean Series of numeric values:
      - 1 if value is NA (None)
      - 0 if values is not NA
    Otherwise returns ColumnExpression, also known as, teradataml DataFrameColumn.
 
EXAMPLES:
    >>> load_example_data("dataframe", "sales")
    >>> df = DataFrame("sales")
 
    # Example 1: Filter out the NA values from 'Mar' column.
    >>> df[df.Mar.isna() == 1]
                  Feb   Jan   Mar    Apr    datetime
    accounts
    Orange Inc  210.0  None  None  250.0  04/01/2017
    Yellow Inc   90.0  None  None    NaN  04/01/2017
 
    # Filter out the non-NA values from 'Mar' column.
    >>> df[df.Mar.isna() == 0]
                 Feb  Jan  Mar    Apr    datetime
    accounts
    Blue Inc    90.0   50   95  101.0  04/01/2017
    Red Inc    200.0  150  140    NaN  04/01/2017
    Jones LLC  200.0  150  140  180.0  04/01/2017
    Alpha Co   210.0  200  215  250.0  04/01/2017
 
    # Example 2: Filter out the NA values from 'Mar' column using boolean True.
    >>> df[df.Mar.isna() == True]
                  Feb   Jan   Mar    Apr    datetime
    accounts
    Orange Inc  210.0  None  None  250.0  04/01/2017
    Yellow Inc   90.0  None  None    NaN  04/01/2017
 
    # Filter out the non-NA values from 'Mar' column using boolean False.
    >>> df[df.Mar.isna() == False]
                 Feb  Jan  Mar    Apr    datetime
    accounts
    Blue Inc    90.0   50   95  101.0  04/01/2017
    Red Inc    200.0  150  140    NaN  04/01/2017
    Jones LLC  200.0  150  140  180.0  04/01/2017
    Alpha Co   210.0  200  215  250.0  04/01/2017
 
    # Example 3: Assign the tested values to dataframe as a column.
    >>> df.assign(isna_=df.Mar.isna())
                  Feb    Jan    Mar    Apr    datetime isna_
    accounts
    Blue Inc     90.0   50.0   95.0  101.0  04/01/2017     0
    Orange Inc  210.0    NaN    NaN  250.0  04/01/2017     1
    Red Inc     200.0  150.0  140.0    NaN  04/01/2017     0
    Yellow Inc   90.0    NaN    NaN    NaN  04/01/2017     1
    Jones LLC   200.0  150.0  140.0  180.0  04/01/2017     0
    Alpha Co    210.0  200.0  215.0  250.0  04/01/2017     0