numpy remove nan rows code example
Example 1: python remove nan rows
df = df[df['my_var'].notna()]
Example 2: numpy remove nan rows
a[ ~np.isnan(a).any(axis=1),:]
df = df[df['my_var'].notna()]
a[ ~np.isnan(a).any(axis=1),:]