I have below data frame, I want to check if every row of a column is null or not and do some operation by looping. When I am checking the condition usually when it is null it still shows as False. I want to loop through each row of the column I am aware of np.where
to check. What is the correct way to check?
data frame:-
a b
NaN 1
NaN 2
NaN 3
NaN 4
code:-
for i,row in df.iterrows():
print(row['a']=='nan')
result:-
False
False
False
False