list remove nan python code example
Example 1: how to delete nan values in python
x = x[~numpy.isnan(x)]
Example 2: python remove nan rows
df = df[df['my_var'].notna()]
x = x[~numpy.isnan(x)]
df = df[df['my_var'].notna()]