title: Spark Scala: How to transform a column in a DF
body: <p>I have a dataframe in Spark with many columns and a udf that I defined. I want the same dataframe back, except with one column transformed. Furthermore, my udf takes in a string and returns a timestamp. Is there an easy way to do this? I tried</p>
  
  <pre><code>val test = myDF.select("my_column").rdd.map(r =&gt; getTimestamp(r)) 
  </code></pre>
  
  <p>but this returns an RDD and just with the transformed column.  </p>