drop nan array python code example
Example 1: remove nan from list python
cleanedList = [x for x in countries if str(x) != 'nan']
Example 2: how to remove rows with nan in pandas
df.dropna(subset=[columns],inplace=True)
cleanedList = [x for x in countries if str(x) != 'nan']
df.dropna(subset=[columns],inplace=True)