python count non nan values in array code example
Example 1: how many nan in array python
np.count_nonzero(~np.isnan(data))
Example 2: count nan pandas
#Python, pandas
#Count missing values for each column of the dataframe df
df.isnull().sum()
Example 3: check nan values in a np array
array_has_nan = np.isnan(array_sum)