isna()/notna() and isnull()/notnull() Methods

Teradata® Python Package User Guide

brand
Teradata Vantage
prodname
Teradata Python Package
vrm_release
16.20
category
User Guide
featnum
B700-4006-098K

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 Python Package 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