title: Add new column with maximum value of another column in pyspark dataframe
body: <p>Need some help on pyspark df. I am trying to append a new column with max value of another column to existing dataframe but getting below error. This is what i am doing.</p>
  <pre><code>df1 = df.withColumn('WEEK_START_DATE', df.agg(f.max('DATE')))
  
  
  
  error:
  AttributeError: 'DataFrame' object has no attribute '_get_object_id'
  </code></pre>