show which columns in dataframe have na

Solutions on MaxInterview for show which columns in dataframe have na by the best coders in the world

showing results for - "show which columns in dataframe have na"
Anouk
29 Sep 2020
1In [71]: df
2Out[71]:
3     a    b  c
40  NaN  7.0  0
51  0.0  NaN  4
62  2.0  NaN  4
73  1.0  7.0  0
84  1.0  3.0  9
95  7.0  4.0  9
106  2.0  6.0  9
117  9.0  6.0  4
128  3.0  0.0  9
139  9.0  0.0  1
14
15In [72]: df.isna().any()
16Out[72]:
17a     True
18b     True
19c    False
20dtype: bool