title: Convert a pyspark dataframe value to a variable string value
body: <p>I would like to convert a dataframe date value to a variable to use in other places.
  I have a df   </p>
  
  <pre><code>.... DateValue
       2020-05-25
  </code></pre>
  
  <p>What I would like is <code>'2020-05-25'</code></p>
  
  <p>Using <code>df.groupBy("DateValue").avg().collect()[0][0]</code></p>
  
  <p>I get <code>datetime.date(2020, 5, 25)</code></p>
  
  <p>I would like to convert that to <code>'2020-05-25'</code></p>