I have something like that:
wines = spark.table("dane_nowe_csv")
selected = wines.select("price")
Price is a double. The question is how can i convert this "selected" to valid type to use with that:
clusters = KMeans.train(selected, 2, maxIterations=10, initializationMode="random")
I'm trying to do that a lot of time today, I searched dozens of topics and there is always some errors and I have a feeling that there is some easy way to do this.