Issue
I have a data series which looks like this:
print mydf
id_L1
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
I would like to check if all the values are NaN
.
My attempt:
pd.isnull(mydf).all()
Output:
True
Is this the correct way to do it?
Solution
Yes, that's correct, but I think a more idiomatic way would be:
mys.isnull().all()
Answered By - Andrew Rosenfeld
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.