Answers for "how to find a list of columns containing null values"

0

how to find a list of columns containing null values

In [5]: df.isnull().any()
Out[5]:
a     True
b     True
c    False
dtype: bool

In [7]: df.columns[df.isnull().any()].tolist()
Out[7]: ['a', 'b']
Posted by: Guest on November-23-2019

Code answers related to "how to find a list of columns containing null values"

Browse Popular Code Answers by Language