title: Pyspark from_unixtime (unix_timestamp) does not convert to timestamp
body: <p>I am using Pyspark with Python 2.7. I have a date column in string (with ms) and would like to convert to timestamp</p>
  
  <p>This is what I have tried so far
  </p>
  
  <pre class="lang-py prettyprint-override"><code>df = df.withColumn('end_time', from_unixtime(unix_timestamp(df.end_time, '%Y-%M-%d %H:%m:%S.%f')) )
  </code></pre>
  
  <p><code>printSchema()</code> shows
  <code>end_time: string (nullable = true)</code></p>
  
  <p>when I expended timestamp as the type of variable</p>