Is This K-NN code for binary classification?

In this K-NN code two axis are required. What if i want to apply K-NN in single column data of an excel sheet. How will i plot that scatter plot in that case. Here two axis are given in code so is it a binary classifier in this case.

Hello Rashmi, what do you want to do exactly ?? As because KNN is used to find that the point is near to which class by taking the k nearest neighbours. But if we have only one class then what do we want to say in that case, it belongs to only that class.
I hope it is clear to you. In case it is clear to you pls mark it as resolve and provide the rating as well as feedback so that we can improve ourselves.
In case there is still some confusion pls let me know, I will surely try to help you out.
Thanks :slight_smile:
Happy Coding !!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.