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

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

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 Limited Missing Value Support.

Example: Handle missing values

>>> df = DataFrame('sales')
>>> df
              Feb   Jan   Mar   Apr    datetime
accounts                                      
Alpha Co    210.0   200   215   250  04/01/2017
Blue Inc     90.0    50    95   101  04/01/2017
Yellow Inc   90.0  None  None  None  04/01/2017
Jones LLC   200.0   150   140   180  04/01/2017
Red Inc     200.0   150   140  None  04/01/2017
Orange Inc  210.0  None  None   250  04/01/2017
>>> df.assign(drop_columns = True, January = df.Jan, NullJanuary = df.Jan.isna())
  January NullJanuary
0     200           0
1      50           0
2    None           1
3     150           0
4     150           0
5    None           1