I am trying to learn and get loose with pandas (which is costing me). I have a dataframe similar to this one:
If I want to know if there is any NaN, None or NaT value in the set I apply the following code.
t = df.isnull().any().any()
print t
If I want to know by columns I apply this,
r = df.isnull().any()
print r
If I want to know value to value,
a = df.isnull()
print a
But what if I want to know which rows have at least one lost value? That is, show me which rows have NaN, None or NaT.
I do not get anything coherent, all the tests have led me to error or to the previous cases.
EDITO
What if I want to know which rows have more than one value lost between their different columns ? For example, to know which rows (samples) have between all their columns 2 or more lost values.
How Abulafia has answered before, to know if a row has a lost value I apply,
df.isnull().any(axis=1)'
It occurs to me that (but it does not work),
df[df.isnull().any(axis=1)>1]