'Can some columns values of a dataset be reduced centred without using the machine learning package who requires dataset transformation into a Vector?

I know that it's possible to center and reduce some values in Spark, using the methods of its machine learning package (org.apache.spark.ml).
But it's at the cost of doing multiples preparations first, to set data into Vectors.

It's not what I willing too. I would like to continue using my datasets as they are, without having to recreate them with their original columns back and the new values calculated from a lists of Vectors.

I'm not in a machine learning scenario at all.

Is there a way to reduce center some column values of a dataset with Spark, without going into the meanders of ml?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source