Well, I got the right answer to my question, of course, I deleted all the NAN values, but there were still inf values โโin my data framework, since I instructed someone, I tried to find a description of the entire column, such as
df['column'].describe()
this line gave the values โโmin, max, mean std and other values, so my maximum value was going to inf, so I deleted this value inf with the following command and worked
df = df[~df.isin([np.nan, np.inf, -np.inf]).any(1)]
this solved my problem. Solution Link
source share