df.mask(df.eq('None')).dropna() 0 1 2 0 1 2 3 3 9 10 11
Not_none_values = filter(None.__ne__, list_of_values) list_of_values = list(Not_none_values)