Usuń nan z listy Python
cleanedList = [x for x in countries if str(x) != 'nan']
Worried Walrus
cleanedList = [x for x in countries if str(x) != 'nan']
x = x[~numpy.isnan(x)]
df = df[df['my_var'].notna()]
df.dropna(subset = ["column2"], inplace=True)