What does this error mean: TypeError: KNeighborsClassifier.fit() missing 1 required positional argument: ‘y’?
This is my code, it follows the answer solution but I’m running an error on the predictions line.
Warning Partial Profiler failure
!!! WARNING Partial Profiler Failure !!!
How to put a try and except TypeError inside a while statement
I need to see if the user input is a float or not. However, I need the question to keep asking the user to re input until it is a float.
I am trying to solve this error, but i don’t know how? I tried several times but failed
TypeError Traceback (most recent call last)
Cell In[8], line 23
20 return smoothed_values
22 # Apply smoothing to thickness column
—> 23 df[‘smoothed_T’] = smooth_thickness(df[‘T’])
25 # Export modified DataFrame (optional)
26 df.to_excel(‘smoothed_thickness.xlsx’, index=False)