Not all tests were passed for fraction_rows_missing

I don’t know why, but when I use:

df.isnull().any(axis=1).sum()

Not all tests were passed for fraction_rows_missing. Check your equations and avoid using global variables inside the function.
this bug appears and it can be fixed by changing the code in this way:

sum(df.isnull().any(axis=1))

what’s the diffrence?

Hi @Erfan_Golkar,

This returns type numpy.float64 , and

returns type float

The answer is expected to have the simple float type.

In order to use df.isnull().any(axis=1).sum(), you can change the answer’s return type and it will work. You can do float(df.isnull().any(axis=1).sum())

Best,
Mubsi

2 Likes