pandas is not nan code example Example 1: python test is nan math.isnan(n) Example 2: numpy is not nan a = a[~np.isnan(a)]