remove nan valuese pandas code example
Example 1: remove nan from list python
cleanedList = [x for x in countries if str(x) != 'nan']
Example 2: drop column with nan values
fish_frame = fish_frame.dropna(axis = 1, how = 'all')
cleanedList = [x for x in countries if str(x) != 'nan']
fish_frame = fish_frame.dropna(axis = 1, how = 'all')