Usuń Nanę z tablicy NP
x = x[~numpy.isnan(x)]
ashattack
x = x[~numpy.isnan(x)]
x = x[numpy.logical_not(numpy.isnan(x))]
df.replace([np.inf, -np.inf], np.nan).dropna(axis=1)