pandas keep only rows without nan code example Example: select non nan values python df[~np.isnan(df)]