Data Cleaning for np.nan values

Here instead of a small 5 unit array say we have a million values of int data with certain values of nan, and we want to mask it, then it would make no sense it giving a mask array of million values also find out each location as to where nan occurs, how would you tackle such datasets?

You can use masked_invalid
Screenshot 2020-07-21 at 5.36.04 PM


Thank you for the help.