title: Spark: convert an RDD[LabeledPoint] to a Dataframe to apply MinMaxScaler, and after scaling get the normalized RDD[LabeledPoint]
body: <p>I'm using RDD[LabeledPoint] in my code. But now I have to normalize data using the MinMax method. </p>
  
  <p>I saw that exist in ml library the MinMaxScaler, but this works with DataFrames: <code>org.apache.spark.ml.feature.MinMaxScaler</code>.</p>
  
  <p>Because of the full code was already written with RDDs, I think I could do the followings steps to don't change anything else: </p>
  
  <ol>
  <li>Convert the RDD[LabeledPoint] to DataFrame</li>
  <li>Apply MinMaxScaler to the DataFrame</li>
  <li>Convert the DataFrame to the RDD[LabeledPoint]</li>
  </ol>
  
  <p>The thing is I do not how can I make it. I don't have column names (but the feature vector in the LabeledPoint has 9 dimension), and I also couldn't adapt other examples to my case. For instance, the code in: 
  <a href="https://stackoverflow.com/a/36909553/5081366">https://stackoverflow.com/a/36909553/5081366</a> 
  or <a href="https://stackoverflow.com/questions/41300360/scaling-each-column-of-a-dataframe">Scaling each column of a dataframe</a> </p>
  
  <p>I will appreciate your help!</p>