cleanedList = [x for x in countries if str(x) != 'nan']
df.dropna(subset=[columns],inplace=True)
df = df.dropna(axis = 0)
x = x[~numpy.isnan(x)]
df = df[df['my_var'].notna()]
df[~np.isnan(df)]
df.dropna(subset = ["column2"], inplace=True)
df[~df.isin([np.nan, np.inf, -np.inf]).any(1)]
a = [[y for y in x if pd.notna(y)] for x in df.values.tolist()]
print (a)
[['str', 'aad', 'asd'], ['ddd'], ['xyz', 'abc'], ['btc', 'trz', 'abd']]
cleanedList = [x for x in countries if str(x) != 'nan']
cleanedList = [x for x in countries if str(x) != 'nan']