Simple k-means implemention using Python3 and Pandas
You have a few problems with your documentation.



First off, your documentation is incomplete in a few places.

For example, in your corrpairs function, you didn't fill in any of your documentation, except for the rtype part.

And, in your kcluster function, you only filled in type rows, type k, and rtype.

Finally, also in kcluster, you called the parameter "rows" in the documentation and called it "cols" in the function signature. Choose one and stick with it.

Documentation is a very important part of every function.



import pdb
def kcluster(cols, k=4):


You should not have an import in the middle of your code; all the importing should be done at the very top of your code like you were doing before.



This review was just mean to point out practices. I had trouble understanding the content of the code (a better documentation probably would've helped).