pyspark.pandas.DataFrame.notnull

DataFrame.notnull() → pyspark.pandas.frame.DataFrame[source]

Detects non-missing values for items in the current Dataframe.

This function takes a dataframe and indicates whether it’s values are valid (not missing, which is NaN in numeric datatypes, None or NaN in objects and NaT in datetimelike).

See also

DataFrame.isnull

Examples

>>> df = ps.DataFrame([(.2, .3), (.0, None), (.6, None), (.2, .1)])
>>> df.notnull()
      0      1
0  True   True
1  True  False
2  True  False
3  True   True
>>> df = ps.DataFrame([['ant', 'bee', 'cat'], ['dog', None, 'fly']])
>>> df.notnull()
      0      1     2
0  True   True  True
1  True  False  True