isna()/notna() and isnull()/notnull() Methods | Teradata Python Package - 17.00 - NA Checking: isna()/notna() and isnull()/notnull() Methods - Teradata Package for Python

Teradata® Package for Python User Guide

Product
Teradata Package for Python
Release Number
17.00
Release Date
November 2021
Content Type
User Guide
Publication ID
B700-4006-070K
Language
English (United States)

Missing values in data can be handled by using the isna() or notna() methods. Currently, the only NA value supported is None. 'isnull' and 'notnull' are aliases of 'isna' and 'notna' respectively. Other possible NA values, +Inf, -Inf, and NaN (typically seen in floating point calculations) are not supported. See the Teradata Package for Python Limitations and Considerations section for more information.

Example

>>> df = DataFrame('iris')
>>> df
           SepalLength  SepalWidth  PetalLength  PetalWidth            Name                                                 
0                 5.800       2.700        5.100        1.90  Iris-virginica
1                 6.500       3.000        5.800        2.20  Iris-virginica
2                 1.012       1.202        3.232        4.23            None
3                 5.400       3.700        1.500        0.20     Iris-setosa
4                 6.700       2.500        5.800        1.80  Iris-virginica
5                 7.200       3.600        6.100        2.50  Iris-virginica
>>> df.assign(drop_columns = True, Name = df.Name, NullName = df.Name.isna())
 
 
             Name NullName
0            None        1
1  Iris-virginica        0
2  Iris-virginica        0
3  Iris-virginica        0
4  Iris-virginica        0
5  Iris-virginica        0