K Mode Clustering Python Code