Python Pandas KMeans: clustering to a dataFrameGroupBy type

0

I want to pass an KMeans.fit(X) argument to dataFrameGroupBy , but I get this error:

ValueError: setting an array element with a sequence.

Would converting the dataFrameGroupBy into a multidimensional array be the only solution or is there a better solution?

    
asked by MIGUEL FUENTES LOPEZ 28.03.2017 в 12:31
source

1 answer

0

The problem was that the groups did not all have the same size. And KMeans requires it.

    
answered by 04.04.2017 в 13:44