GroupBy on arrays
To discover the dask, I am currently implementing the K-Means algorithm. To update the tools, I want to use groupBy, but I need to convert the dask.array to dask.dataframe and then go back to dask.array:
def update(X, Label):
'''Update the means by using the labels computed by assign'''
Y = X.to_dask_dataframe()
return Y.groupby(Label.to_dask_dataframe()).mean().values
Is there a way to do this without conversion?
+3
source to share
No one has answered this question yet
Check out similar questions: