pandas remove nan from list code example
Example 1: remove nan from list python
cleanedList = [x for x in countries if str(x) != 'nan']
Example 2: how to delete nan values in python
x = x[~numpy.isnan(x)]
Example 3: python remove nan rows
df = df[df['my_var'].notna()]
Example 4: Remove nan from list python
df.dropna(subset = ["column2"], inplace=True)