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

Teradata® Python Package User Guide

Product
Teradata Python Package
Release Number
16.20
Published
February 2020
Language
English (United States)
Last Update
2020-02-29
dita:mapPath
rkb1531260709148.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
B700-4006
lifecycle
previous
Product Category
Teradata Vantage

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